GET /#Action=RunInstances

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

You can create a launch template, which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify the launch template instead of specifying the launch parameters.

To ensure faster instance launches, break up large requests into smaller batches. For example, create five separate launch requests for 100 instances each instead of one launch request for 500 instances.

An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances. You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging your Amazon EC2 resources.

Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key pairs.

For troubleshooting, see What to do if an instance immediately terminates, and Troubleshooting connecting to your instance.

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide.

Servers

Request headers

Name Type Required Description
X-Amz-Content-Sha256 String No
X-Amz-Credential String No
X-Amz-Date String No
X-Amz-Algorithm String No
X-Amz-SignedHeaders String No
X-Amz-Security-Token String No
X-Amz-Signature String No

Query parameters

Name Type Required Description
MaxCount Integer Yes

The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount.

Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.

Version String Yes

Possible values:

  • "2016-11-15"
IamInstanceProfile Object No

The name or Amazon Resource Name (ARN) of an IAM instance profile.

MaintenanceOptions Object No

The maintenance and recovery options for the instance.

ElasticGpuSpecification[] Array No

An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide.

ImageId String No

The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.

KeyName String No

The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

CreditSpecification Object No

The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. For more information, see Burstable performance instances in the Amazon EC2 User Guide.

Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)

For T3 instances with host tenancy, only standard is supported.

ElasticInferenceAccelerator[] Array No

An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.

You cannot specify accelerators from different generations in the same request.

Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.

Ipv6Address[] Array No

[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

You cannot specify this option and the network interfaces option in the same request.

BlockDeviceMapping[] Array No

The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide.

HibernationOptions Object No

Indicates whether an instance is enabled for hibernation. For more information, see Hibernate your instance in the Amazon EC2 User Guide.

You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.

InstanceType String No

The instance type. For more information, see Instance types in the Amazon EC2 User Guide.

Default: m1.small

Possible values:

  • "c3.xlarge"
  • "m6g.16xlarge"
  • "c5a.24xlarge"
  • "d3.8xlarge"
  • "r5ad.2xlarge"
  • "r6g.12xlarge"
  • "m5ad.2xlarge"
  • "m6g.12xlarge"
  • "x2gd.8xlarge"
  • "m2.4xlarge"
  • "i4i.large"
  • "im4gn.xlarge"
  • "r5n.24xlarge"
  • "m5dn.4xlarge"
  • "c6g.16xlarge"
  • "r6g.16xlarge"
  • "t3.nano"
  • "m5a.24xlarge"
  • "m5dn.8xlarge"
  • "m3.large"
  • "im4gn.4xlarge"
  • "im4gn.8xlarge"
  • "c5.24xlarge"
  • "m5zn.3xlarge"
  • "m6gd.16xlarge"
  • "f1.2xlarge"
  • "r5b.xlarge"
  • "r3.2xlarge"
  • "x2idn.16xlarge"
  • "m5n.24xlarge"
  • "x1e.xlarge"
  • "c5ad.2xlarge"
  • "p2.xlarge"
  • "x2gd.4xlarge"
  • "d3.4xlarge"
  • "c6i.12xlarge"
  • "c6i.16xlarge"
  • "m6gd.12xlarge"
  • "m6idn.large"
  • "is4gen.medium"
  • "x2iedn.32xlarge"
  • "m5a.xlarge"
  • "r6idn.metal"
  • "c6i.metal"
  • "r6id.32xlarge"
  • "r5.4xlarge"
  • "r5.8xlarge"
  • "mac2.metal"
  • "c5d.2xlarge"
  • "i4i.metal"
  • "m5d.xlarge"
  • "g4dn.xlarge"
  • "u-12tb1.metal"
  • "vt1.3xlarge"
  • "p4d.24xlarge"
  • "vt1.24xlarge"
  • "m6idn.xlarge"
  • "m5dn.xlarge"
  • "c6a.metal"
  • "m6in.metal"
  • "m6idn.32xlarge"
  • "t4g.nano"
  • "m3.xlarge"
  • "c3.2xlarge"
  • "t3.2xlarge"
  • "trn1.32xlarge"
  • "c6g.12xlarge"
  • "r5a.24xlarge"
  • "m6in.32xlarge"
  • "r5dn.8xlarge"
  • "r6i.xlarge"
  • "r5dn.4xlarge"
  • "trn1.2xlarge"
  • "m5a.8xlarge"
  • "r6idn.xlarge"
  • "m4.2xlarge"
  • "m5a.4xlarge"
  • "c6id.large"
  • "d3en.6xlarge"
  • "g3s.xlarge"
  • "i2.8xlarge"
  • "u-12tb1.112xlarge"
  • "m6id.16xlarge"
  • "m5.2xlarge"
  • "r7g.xlarge"
  • "i3en.2xlarge"
  • "g5g.4xlarge"
  • "c5d.metal"
  • "m6g.medium"
  • "r5.16xlarge"
  • "m6gd.metal"
  • "r5.metal"
  • "x2iedn.metal"
  • "c7g.8xlarge"
  • "g4ad.4xlarge"
  • "m6a.2xlarge"
  • "x2iezn.metal"
  • "x1.32xlarge"
  • "c3.large"
  • "c5n.2xlarge"
  • "m5n.4xlarge"
  • "c7g.xlarge"
  • "r6i.2xlarge"
  • "u-9tb1.metal"
  • "g4dn.2xlarge"
  • "m6idn.2xlarge"
  • "r6i.24xlarge"
  • "hpc6id.32xlarge"
  • "m5n.xlarge"
  • "x2iezn.4xlarge"
  • "z1d.3xlarge"
  • "hs1.8xlarge"
  • "m6i.12xlarge"
  • "m7g.2xlarge"
  • "c6gn.4xlarge"
  • "r6i.metal"
  • "c6i.4xlarge"
  • "r6id.xlarge"
  • "c6gn.xlarge"
  • "r6g.8xlarge"
  • "g5.48xlarge"
  • "m6id.24xlarge"
  • "r5n.8xlarge"
  • "r5a.8xlarge"
  • "r5n.12xlarge"
  • "r6gd.2xlarge"
  • "i3en.large"
  • "c5a.8xlarge"
  • "x1e.16xlarge"
  • "x2idn.24xlarge"
  • "inf1.24xlarge"
  • "m6gd.large"
  • "p3.2xlarge"
  • "h1.2xlarge"
  • "m5n.16xlarge"
  • "r5d.8xlarge"
  • "m6id.2xlarge"
  • "c6id.2xlarge"
  • "r5dn.xlarge"
  • "r6i.16xlarge"
  • "r6gd.medium"
  • "x2iedn.2xlarge"
  • "m5.12xlarge"
  • "c5d.large"
  • "c6in.16xlarge"
  • "m6in.large"
  • "r5dn.16xlarge"
  • "a1.4xlarge"
  • "c5ad.16xlarge"
  • "t1.micro"
  • "m5d.4xlarge"
  • "t2.2xlarge"
  • "r5n.metal"
  • "r5b.16xlarge"
  • "i3.xlarge"
  • "r6i.large"
  • "m6i.4xlarge"
  • "i3.large"
  • "p4de.24xlarge"
  • "c7g.metal"
  • "m5n.large"
  • "m6in.2xlarge"
  • "m6in.4xlarge"
  • "m6a.xlarge"
  • "r6in.metal"
  • "c6gd.8xlarge"
  • "c6gd.2xlarge"
  • "m4.xlarge"
  • "r6g.medium"
  • "t3.large"
  • "m6in.8xlarge"
  • "r5a.16xlarge"
  • "cr1.8xlarge"
  • "m1.small"
  • "m5d.metal"
  • "r5a.2xlarge"
  • "a1.medium"
  • "r5ad.16xlarge"
  • "d3.xlarge"
  • "m6gd.4xlarge"
  • "c5.9xlarge"
  • "m6a.16xlarge"
  • "r5ad.12xlarge"
  • "g2.2xlarge"
  • "m5n.metal"
  • "m6gd.xlarge"
  • "m7g.8xlarge"
  • "r5d.metal"
  • "r4.2xlarge"
  • "c5n.xlarge"
  • "r6gd.12xlarge"
  • "x1e.4xlarge"
  • "r6a.metal"
  • "r6in.8xlarge"
  • "a1.metal"
  • "r4.8xlarge"
  • "m7g.4xlarge"
  • "m5d.2xlarge"
  • "r5dn.24xlarge"
  • "r6in.2xlarge"
  • "dl1.24xlarge"
  • "m5d.8xlarge"
  • "r4.xlarge"
  • "c1.medium"
  • "c5ad.large"
  • "c6g.xlarge"
  • "r6idn.16xlarge"
  • "t2.small"
  • "i3.metal"
  • "m5d.12xlarge"
  • "g4dn.16xlarge"
  • "m5a.12xlarge"
  • "r6gd.4xlarge"
  • "x1e.32xlarge"
  • "r5d.16xlarge"
  • "m5ad.24xlarge"
  • "cg1.4xlarge"
  • "g5.24xlarge"
  • "im4gn.16xlarge"
  • "g4dn.12xlarge"
  • "r6gd.8xlarge"
  • "r5n.large"
  • "d2.4xlarge"
  • "r5d.12xlarge"
  • "m6g.4xlarge"
  • "m6g.8xlarge"
  • "m5a.16xlarge"
  • "c6id.8xlarge"
  • "i3en.24xlarge"
  • "c6g.2xlarge"
  • "c6gd.12xlarge"
  • "i3en.xlarge"
  • "r5d.2xlarge"
  • "c6id.4xlarge"
  • "m6id.xlarge"
  • "r5dn.large"
  • "g5.xlarge"
  • "c6a.12xlarge"
  • "g5g.xlarge"
  • "x2iedn.24xlarge"
  • "r5n.xlarge"
  • "t3.micro"
  • "r6a.8xlarge"
  • "r5dn.12xlarge"
  • "m6id.12xlarge"
  • "m5d.24xlarge"
  • "r6id.4xlarge"
  • "c5n.9xlarge"
  • "x2gd.16xlarge"
  • "i3en.6xlarge"
  • "p3.16xlarge"
  • "g4ad.16xlarge"
  • "t2.xlarge"
  • "c5n.4xlarge"
  • "c6id.32xlarge"
  • "r6idn.4xlarge"
  • "m5.4xlarge"
  • "i2.2xlarge"
  • "m6i.24xlarge"
  • "c7g.2xlarge"
  • "r3.xlarge"
  • "m6gd.medium"
  • "i4i.4xlarge"
  • "i3en.12xlarge"
  • "g3.4xlarge"
  • "r6i.8xlarge"
  • "g4ad.8xlarge"
  • "p2.16xlarge"
  • "c6a.24xlarge"
  • "m6a.4xlarge"
  • "i4i.16xlarge"
  • "g4ad.2xlarge"
  • "t3a.medium"
  • "x2iezn.6xlarge"
  • "m6g.xlarge"
  • "t3a.nano"
  • "m3.medium"
  • "m6a.32xlarge"
  • "d3en.2xlarge"
  • "p3dn.24xlarge"
  • "m6i.metal"
  • "r5.large"
  • "t2.micro"
  • "c6g.metal"
  • "r5n.4xlarge"
  • "r6idn.32xlarge"
  • "c6i.8xlarge"
  • "c7g.large"
  • "r6i.12xlarge"
  • "im4gn.large"
  • "m3.2xlarge"
  • "h1.16xlarge"
  • "m6i.large"
  • "m5.xlarge"
  • "c5d.xlarge"
  • "c3.8xlarge"
  • "c6gn.12xlarge"
  • "r5d.large"
  • "m4.10xlarge"
  • "r5n.16xlarge"
  • "m6idn.16xlarge"
  • "c6gd.metal"
  • "m5n.12xlarge"
  • "r7g.2xlarge"
  • "t2.large"
  • "u-24tb1.metal"
  • "m5zn.2xlarge"
  • "m5.16xlarge"
  • "m6idn.metal"
  • "m7g.medium"
  • "m5ad.large"
  • "c5.4xlarge"
  • "c6a.large"
  • "c6a.2xlarge"
  • "c6gn.large"
  • "m6a.48xlarge"
  • "r6a.2xlarge"
  • "c5ad.12xlarge"
  • "m5ad.4xlarge"
  • "m5ad.8xlarge"
  • "r5ad.4xlarge"
  • "c6id.12xlarge"
  • "c6in.32xlarge"
  • "u-6tb1.56xlarge"
  • "c5ad.8xlarge"
  • "c6gn.medium"
  • "m2.2xlarge"
  • "r5.xlarge"
  • "r3.8xlarge"
  • "im4gn.2xlarge"
  • "m5.large"
  • "m5dn.2xlarge"
  • "r5ad.8xlarge"
  • "m6in.16xlarge"
  • "g5.16xlarge"
  • "m1.large"
  • "t3a.micro"
  • "m5ad.16xlarge"
  • "m5ad.12xlarge"
  • "m6id.metal"
  • "g5.12xlarge"
  • "u-18tb1.112xlarge"
  • "m5a.large"
  • "i4i.32xlarge"
  • "c5ad.4xlarge"
  • "r3.4xlarge"
  • "m7g.xlarge"
  • "t3.xlarge"
  • "c5a.large"
  • "x2gd.2xlarge"
  • "d3.2xlarge"
  • "r6gd.large"
  • "f1.4xlarge"
  • "c7g.16xlarge"
  • "m5dn.12xlarge"
  • "x2gd.large"
  • "c6i.2xlarge"
  • "r5n.2xlarge"
  • "m6in.xlarge"
  • "h1.8xlarge"
  • "i2.xlarge"
  • "m5dn.16xlarge"
  • "r6g.2xlarge"
  • "r6a.32xlarge"
  • "m5ad.xlarge"
  • "c7g.medium"
  • "c6a.xlarge"
  • "m4.16xlarge"
  • "r6a.xlarge"
  • "m7g.16xlarge"
  • "m7g.12xlarge"
  • "c5a.2xlarge"
  • "c5.2xlarge"
  • "r7g.4xlarge"
  • "g5g.16xlarge"
  • "d2.xlarge"
  • "x2iedn.8xlarge"
  • "p3.8xlarge"
  • "m6a.24xlarge"
  • "t3a.small"
  • "cc2.8xlarge"
  • "c6id.16xlarge"
  • "r6a.24xlarge"
  • "h1.4xlarge"
  • "c6a.8xlarge"
  • "c6gd.large"
  • "x2iedn.4xlarge"
  • "i3.16xlarge"
  • "c7g.12xlarge"
  • "c6a.4xlarge"
  • "m6id.large"
  • "inf1.xlarge"
  • "is4gen.4xlarge"
  • "is4gen.8xlarge"
  • "z1d.12xlarge"
  • "r6id.8xlarge"
  • "x2gd.12xlarge"
  • "m5zn.metal"
  • "m5a.2xlarge"
  • "c6g.large"
  • "t3a.2xlarge"
  • "m5zn.xlarge"
  • "r7g.metal"
  • "m5dn.24xlarge"
  • "i4i.8xlarge"
  • "m6id.4xlarge"
  • "g5g.2xlarge"
  • "is4gen.xlarge"
  • "r5d.24xlarge"
  • "r6idn.8xlarge"
  • "m5.8xlarge"
  • "x2gd.metal"
  • "r7g.8xlarge"
  • "g4ad.xlarge"
  • "r5dn.metal"
  • "r6in.32xlarge"
  • "m6idn.8xlarge"
  • "t4g.2xlarge"
  • "r7g.16xlarge"
  • "r5d.xlarge"
  • "g3.8xlarge"
  • "m5n.2xlarge"
  • "c5.large"
  • "x2idn.32xlarge"
  • "x2gd.medium"
  • "t2.nano"
  • "t2.medium"
  • "m5zn.large"
  • "c6in.24xlarge"
  • "c1.xlarge"
  • "c5ad.24xlarge"
  • "r5b.4xlarge"
  • "d3en.8xlarge"
  • "r6i.4xlarge"
  • "x2iezn.2xlarge"
  • "r6in.large"
  • "m5dn.large"
  • "c6i.32xlarge"
  • "t3.small"
  • "r6id.16xlarge"
  • "r7g.large"
  • "r6gd.metal"
  • "x2iedn.xlarge"
  • "g4dn.8xlarge"
  • "c3.4xlarge"
  • "c6gn.16xlarge"
  • "m6a.8xlarge"
  • "i4i.xlarge"
  • "m5dn.metal"
  • "r5.2xlarge"
  • "r5.24xlarge"
  • "m5zn.6xlarge"
  • "a1.large"
  • "c5.18xlarge"
  • "m6idn.12xlarge"
  • "m5d.large"
  • "inf1.6xlarge"
  • "m6g.2xlarge"
  • "m6in.12xlarge"
  • "x2idn.metal"
  • "r5a.xlarge"
  • "r6in.24xlarge"
  • "r5ad.24xlarge"
  • "c6id.xlarge"
  • "r5dn.2xlarge"
  • "g5.2xlarge"
  • "c4.2xlarge"
  • "c6g.8xlarge"
  • "c6gd.medium"
  • "m5.metal"
  • "r4.large"
  • "i3.4xlarge"
  • "c6in.2xlarge"
  • "m4.4xlarge"
  • "m6id.32xlarge"
  • "r6a.48xlarge"
  • "c4.4xlarge"
  • "r5b.12xlarge"
  • "r6g.large"
  • "c4.8xlarge"
  • "c6g.medium"
  • "m6i.2xlarge"
  • "z1d.large"
  • "m6i.8xlarge"
  • "r6a.large"
  • "t4g.medium"
  • "m4.large"
  • "c6gd.4xlarge"
  • "r6id.24xlarge"
  • "m1.xlarge"
  • "r6in.4xlarge"
  • "m1.medium"
  • "z1d.xlarge"
  • "m6gd.2xlarge"
  • "r5a.4xlarge"
  • "r6gd.16xlarge"
  • "x1.16xlarge"
  • "c6a.48xlarge"
  • "x1e.2xlarge"
  • "m5.24xlarge"
  • "r5a.12xlarge"
  • "r6in.16xlarge"
  • "r6in.12xlarge"
  • "m6a.12xlarge"
  • "hi1.4xlarge"
  • "m6gd.8xlarge"
  • "r4.4xlarge"
  • "r6a.12xlarge"
  • "x1e.8xlarge"
  • "i3en.metal"
  • "r5b.metal"
  • "r6a.16xlarge"
  • "c4.xlarge"
  • "c5a.12xlarge"
  • "c5a.16xlarge"
  • "g5.8xlarge"
  • "m6i.32xlarge"
  • "r6g.metal"
  • "c6gn.2xlarge"
  • "c6id.metal"
  • "m5d.16xlarge"
  • "g2.8xlarge"
  • "m6i.xlarge"
  • "r5b.large"
  • "r6id.metal"
  • "d2.8xlarge"
  • "r6idn.12xlarge"
  • "g4dn.metal"
  • "m6in.24xlarge"
  • "m6g.large"
  • "t4g.micro"
  • "z1d.2xlarge"
  • "g5g.metal"
  • "c5d.12xlarge"
  • "g5g.8xlarge"
  • "c6in.large"
  • "u-18tb1.metal"
  • "t4g.xlarge"
  • "a1.2xlarge"
  • "c5n.large"
  • "r6i.32xlarge"
  • "t3a.xlarge"
  • "c6i.24xlarge"
  • "g5.4xlarge"
  • "c6a.16xlarge"
  • "z1d.6xlarge"
  • "m7g.metal"
  • "is4gen.large"
  • "c6in.8xlarge"
  • "r6a.4xlarge"
  • "c6in.4xlarge"
  • "i3.2xlarge"
  • "d3en.4xlarge"
  • "hpc6a.48xlarge"
  • "t3a.large"
  • "c6i.large"
  • "i2.4xlarge"
  • "r6idn.24xlarge"
  • "m6id.8xlarge"
  • "c5.xlarge"
  • "i3en.3xlarge"
  • "r5.12xlarge"
  • "c5d.24xlarge"
  • "t3.medium"
  • "m7g.large"
  • "c6in.xlarge"
  • "c6gd.16xlarge"
  • "r6id.2xlarge"
  • "r6gd.xlarge"
  • "inf1.2xlarge"
  • "c5.12xlarge"
  • "c5n.metal"
  • "r6idn.2xlarge"
  • "c5n.18xlarge"
  • "r6idn.large"
  • "c6gd.xlarge"
  • "m6idn.24xlarge"
  • "r6in.xlarge"
  • "c7g.4xlarge"
  • "p2.8xlarge"
  • "i4i.2xlarge"
  • "u-6tb1.112xlarge"
  • "g3.16xlarge"
  • "x2iedn.16xlarge"
  • "u-24tb1.112xlarge"
  • "d3en.12xlarge"
  • "c5.metal"
  • "c6id.24xlarge"
  • "g4dn.4xlarge"
  • "r5b.8xlarge"
  • "x2iezn.8xlarge"
  • "t4g.small"
  • "r4.16xlarge"
  • "m6idn.4xlarge"
  • "r7g.12xlarge"
  • "r7g.medium"
  • "m6a.metal"
  • "c5a.xlarge"
  • "u-3tb1.56xlarge"
  • "m6g.metal"
  • "r5b.2xlarge"
  • "r3.large"
  • "r6id.large"
  • "r6g.4xlarge"
  • "vt1.6xlarge"
  • "u-6tb1.metal"
  • "c6gn.8xlarge"
  • "mac1.metal"
  • "c5d.4xlarge"
  • "cc1.4xlarge"
  • "t4g.large"
  • "z1d.metal"
  • "r5ad.large"
  • "u-9tb1.112xlarge"
  • "c5d.9xlarge"
  • "c6in.metal"
  • "m5n.8xlarge"
  • "x2gd.xlarge"
  • "c5d.18xlarge"
  • "c6i.xlarge"
  • "x2iezn.12xlarge"
  • "r6id.12xlarge"
  • "m6i.16xlarge"
  • "d2.2xlarge"
  • "r5b.24xlarge"
  • "d3en.xlarge"
  • "r5a.large"
  • "c5a.4xlarge"
  • "r5d.4xlarge"
  • "m6a.large"
  • "m2.xlarge"
  • "m5zn.12xlarge"
  • "a1.xlarge"
  • "c4.large"
  • "c6a.32xlarge"
  • "i3.8xlarge"
  • "c5ad.xlarge"
  • "c6g.4xlarge"
  • "f1.16xlarge"
  • "is4gen.2xlarge"
  • "r5ad.xlarge"
  • "r6g.xlarge"
  • "c6in.12xlarge"
EbsOptimized Boolean No

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

Default: false

LaunchTemplate Object No

The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.

UserData String No

The user data script to make available to the instance. For more information, see Run commands on your Linux instance at launch and Run commands on your Windows instance at launch. If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.

TagSpecification[] Array No

The tags to apply to the resources that are created during instance launch.

You can specify tags for the following resources only:

  • Instances

  • Volumes

  • Elastic graphics

  • Spot Instance requests

  • Network interfaces

To tag a resource after it has been created, see CreateTags.

KernelId String No

The ID of the kernel.

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide.

SubnetId String No

[EC2-VPC] The ID of the subnet to launch the instance into.

If you specify a network interface, you must specify any subnets as part of the network interface.

Action String Yes

Possible values:

  • "RunInstances"
NetworkInterface[] Array No

The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

EnclaveOptions Object No

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.

You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

Ipv6AddressCount Integer No

[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

You cannot specify this option and the network interfaces option in the same request.

DisableApiTermination Boolean No

If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by running the shutdown command from the instance.

Default: false

PrivateDnsNameOptions Object No

The options for the instance hostname. The default values are inherited from the subnet.

SecurityGroup[] Array No

[EC2-Classic, default VPC] The names of the security groups.

If you specify a network interface, you must specify any security groups as part of the network interface.

Default: Amazon EC2 uses the default security group.

Placement Object No

The placement for the instance.

CapacityReservationSpecification Object No

Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

Monitoring Object No

Specifies whether detailed monitoring is enabled for the instance.

InstanceInitiatedShutdownBehavior String No

Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Default: stop

Possible values:

  • "stop"
  • "terminate"
RamdiskId String No

The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide.

MetadataOptions Object No

The metadata options for the instance. For more information, see Instance metadata and user data.

MinCount Integer Yes

The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.

ClientToken String No

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

For more information, see Ensuring Idempotency.

Constraints: Maximum 64 ASCII characters

SecurityGroupId[] Array No

The IDs of the security groups. You can create a security group using CreateSecurityGroup.

If you specify a network interface, you must specify any security groups as part of the network interface.

LicenseSpecification[] Array No

The license configurations.

PrivateIpAddress String No

[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

You cannot specify this option and the network interfaces option in the same request.

InstanceMarketOptions Object No

The market (purchasing) option for the instances.

For RunInstances, persistent Spot Instance requests are only supported when InstanceInterruptionBehavior is set to either hibernate or stop.

CpuOptions Object No

The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.

DisableApiStop Boolean No

Indicates whether an instance is enabled for stop protection. For more information, see Stop protection.

DryRun Boolean No

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

AdditionalInfo String No

Reserved.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.