NAMEec2-run-instances - Launch instances of an image
SYNOPSISec2run ([ec2-run-instances]) ec2run [GENERAL OPTIONS] AMI [SPECIFIC OPTIONS]
GENERAL NOTESAny command option/parameter may be passed a value of '-' to indicate that values for that option should be read from stdin.
DESCRIPTIONLaunch a number of instances of a specified AMI. The AMI parameter is the AMI ID of the AMI to launch.
GENERAL OPTIONS-K, --private-key KEY Specify KEY as the private key to use. Defaults to the value of the EC2_PRIVATE_KEY environment variable (if set). Overrides the default. -C, --cert CERT Specify CERT as the X509 certificate to use. Defaults to the value of the EC2_CERT environment variable (if set). Overrides the default. -U, --url URL Specify URL as the web service URL to use. Defaults to the value of 'https://ec2.amazonaws.com' or to that of the EC2_URL environment variable (if set). Overrides the default. --region REGION Specify REGION as the web service region to use. This option will override the URL specified by the "-U URL" option and EC2_URL environment variable. -v, --verbose Verbose output. -?, --help Display this help. -H, --headers Display column headers. --debug Display additional debugging information. --show-empty-fields Indicate empty fields. --hide-tags Do not display tags for tagged resources. --connection-timeout TIMEOUT Specify a connection timeout TIMEOUT (in seconds). --request-timeout TIMEOUT Specify a request timeout TIMEOUT (in seconds).
SPECIFIC OPTIONS-b, --block-device-mapping MAPPING Defines a block device mapping for the instance(s), in the form '<device>=<block-device>', where 'block-device' can be one of the following: - 'none': indicates that a block device that would be exposed at the specified device should be suppressed. For example: '/dev/sdb=none' - 'ephemeral[0-3]': indicates that the Amazon EC2 ephemeral store (instance local storage) should be exposed at the specified device. For example: '/dev/sdc=ephemeral0'. - '[<snapshot-id>][:<size>[:<delete-on-termination>]]': indicates that an Amazon EBS volume, created from the specified Amazon EBS snapshot, should be exposed at the specified device. The following combinations are supported: - '<snapshot-id>': the ID of an Amazon EBS snapshot, which must be owned by or restorable by the caller. May be left out if a <size> is specified, creating an empty Amazon EBS volume of the specified size. - '<size>': the size (GiBs) of the Amazon EBS volume to be created. If a snapshot was specified, this may not be smaller than the size of the snapshot itself. - '<delete-on-termination>': indicates whether the Amazon EBS volume should be deleted on instance termination. If not specified, this will default to 'true' and the volume will be deleted. For example: '/dev/sdb=snap-7eb96d16' '/dev/sdc=snap-7eb96d16:80:false' '/dev/sdd=:120' See the latest Developer's Guide for further information. -d, --user-data DATA Specifies the user data to be made available to the instance(s) in this reservation. -f, --user-data-file DATA-FILE Specifies the file containing user data to be made available to the instance(s) in this reservation. -g, --group GROUP [--group GROUP...] Specifies the security group (or groups if specified multiple times) within which the instance(s) should be run. Determines the ingress firewall rules that will be applied to the launched instances. Defaults to the user's default group if not supplied. -k, --key KEYPAIR Specifies the key pair to use when launching the instance(s). -m, --monitor Enables monitoring of the specified instance(s). -n, --instance-count MIN[-MAX] The number of instances to attempt to launch. May be specified as a single integer or as a range (min-max). This specifies the minumum and maximum number of instances to attempt to launch. If a single integer is specified min and max are both set to that value. -s, --subnet SUBNET The ID of the Amazon VPC subnet in which to launch the instance(s). -t, --instance-type TYPE Specifies the type of instance to be launched. Refer to the latest Developer's Guide for valid values. -z, --availability-zone ZONE Specifies the availability zone to launch the instance(s) in. Run the 'ec2-describe-availability-zones' command for a list of values, and see the latest Developer's Guide for their meanings. --addressing ADDRESSING Specifies the addressing type to use for the instance(s). Refer to the latest Developer's Guide for valid values. --disable-api-termination Indicates that the instance(s) may not be terminated using the TerminateInstances API call. --instance-initiated-shutdown-behavior BEHAVIOR Indicates what the instance(s) should do if an on instance shutdown is issued. The following values are supported - 'stop': indicates that the instance should move into the stopped state and remain available to be restarted. - 'terminate': indicates that the instance should move into the terminated state. --kernel KERNEL Specifies the ID of the kernel to launch the instance(s) with. --license-pool LICENSE_POOL Specifies the license pool to use when launching the instance(s). --ramdisk RAMDISK Specifies the ID of the ramdisk to launch the instance(s) with. --placement-group GROUP_NAME Specifies the placement group into which the instances should be launched. --private-ip-address IP_ADDRESS Specifies the private IP address to use when launching an Amazon VPC instance. --client-token TOKEN Client token for idempotency. --tenancy TENANCY Specifies the tenancy of an instance, which can be default or dedicated. - default: The default tenancy. - dedicated: The instance does not share hardware with instances launched from other accounts (additional charges apply). This option is only available for VPC instances.
SEE ALSO//docs.amazonwebservices.com/AWSEC2/2011-05-15/CommandLineReference //docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference EC2-RUN-INSTANCES(1)