EC2-RUN-INSTANCES(1)
๐ EC2-RUN-INSTANCES(1) โ the "ec2-run-instances" glow-up ๐
okay bestie, welcome to the User Commands section, this is ec2-run-instances and it is literally the moment your cloud dreams get a body. let's go ๐ฆ
โจ NAME โจ
ec2-run-instances โ launch instances of an image. yes. that's the whole job. iconic behavior honestly ๐
๐ธ SYNOPSIS ๐ธ
ec2run ([ec2-run-instances])
ec2run [GENERAL OPTIONS] AMI [SPECIFIC OPTIONS]
๐ GENERAL NOTES ๐
real talk: any command option or parameter can be handed a value of - and that means read the values for that option from stdin. every single one. no cap. ๐ซถ
๐ DESCRIPTION ๐
You launch a bunch of instances of a specified AMI. that's it, that's the vibe โจ
The AMI parameter is the AMI ID of the AMI to launch. yes bestie the AMI parameter takes the AMI ID, we love a self-explanatory queen ๐
๐ GENERAL OPTIONS ๐
-O,--aws-access-key KEYโ your AWS Access Key ID. defaults to whateverAWS_ACCESS_KEYis set to in the environment (if it's set at all) ๐-W,--aws-secret-key KEYโ your AWS Secret Access Key. defaults to theAWS_SECRET_KEYenvironment variable (if set) ๐คซ-T,--security-token TOKENโ AWS delegation token. defaults to theAWS_DELEGATION_TOKENenvironment variable (if set) ๐ซ-K,--private-key KEYโ [DEPRECATED] specifyKEYas the private key to use. defaults to the value of theEC2_PRIVATE_KEYenvironment variable (if set), and overrides the default ๐-C,--cert CERTโ [DEPRECATED] specifyCERTas the X509 certificate to use. defaults to the value of theEC2_CERTenvironment variable (if set), and overrides the default ๐-U,--url URLโ specifyURLas the web service URL to use. defaults tohttps://ec2.amazonaws.com(us-east-1) or to the value of theEC2_URLenvironment variable (if set). overrides the default ๐--region REGIONโ specifyREGIONas the web service region to use. this option overrides the URL given by the-U URLoption and theEC2_URLenvironment variable. it defaults to the region specified by theEC2_URLenvironment variable, orus-east-1if that env var isn't set ๐-D,--auth-dry-runโ check whether you could do the thing instead of actually doing the thing. a vibe check for your permissions, basically ๐-v,--verboseโ verbose output. give me all the lore ๐ข-?,--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 timeoutTIMEOUT(in seconds) โณ--request-timeout TIMEOUTโ specify a request timeoutTIMEOUT(in seconds) โฐ
๐ฅ SPECIFIC OPTIONS ๐ฅ
-b,--block-device-mapping MAPPINGโ defines a block device mapping for the image, 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>][:<type>[:<iops>]][:encrypted]]': 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 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.'<type>': specifies the volume type. this can be either'standard'or'io1'. defaults to standard.'<iops>': the requested number of I/O operations per second that the volume can support.'encrypted': indicates that the volume should be encrypted.
for example:
'/dev/sdb=snap-7eb96d16'
'/dev/sdc=snap-7eb96d16:80:false'
'/dev/sdc=snap-7eb96d16:80:false:io1:100'
'/dev/sdd=:120'
'/dev/sdd=:120:encrypted'
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 name of 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 minimum 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 ๐ก-p,--iam-profile ARNโ specifies the IAM profile to associate with the launched instance(s). IAM profiles enable you to manage permissions for applications running on EC2. this is either the ARN of the profile or the name of the role ๐ญ--client-token TOKENโ client token for idempotency. so if you accidentally send it twice, it's not twice bestie, it's once ๐--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 ๐
--ebs-optimizedโ provides dedicated throughput to Amazon EBS and a software stack optimized for EBS I/O. additional usage charges apply when using this option ๐ธ-a,--network-attachment NETWORKATTACHMENTโ specifies the network attachment for the instance to launch. the format of the attachment definition is as follows:
<nic>:<dev index>[:<subnet>[:<description>[:<priv IP>[:<SGs>[:<DOT>[:SIP count[:<SIPs>]]]]]]]
where:
SGsis a comma separated list of security group IDs.DOTis either true or false, denoting whether to delete the interface on termination.SIP countis the count of secondary private IP addresses.SIPsis a list of secondary private IP addresses.
specify only one of SIP count or SIPs. pick a lane bestie, not both ๐
--secondary-private-ip-address SECONDARY-PRIVATE-IP-ADDRESSโ the secondary private IP address to assign to the specified network interface of the instance to be launched ๐ฎ--secondary-private-ip-address-count SECONDARY-PRIVATE-ADDRESS-COUNTโ the number of secondary private IP addresses to be automatically assigned to the specified network interface of the instance to be launched ๐ข--associate-public-ip-address BOOLEANโ specify whether or not an AWS public IP address should be assigned to the eth0 of the instances to be launched. instances launched into a default subnet are assigned a public IP address by default ๐
๐ฆ SEE ALSO ๐ฆ
http://docs.amazonwebservices.com/AWSEC2/2014-05-01/CommandLineReferencehttp://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference
and that's the whole page bestie, you ate ๐ this was the EC2 API command line tools, version 1.6.14.1, api=2014-05-01, manual page EC2-RUN-INSTANCES(1). go launch something iconic. periodt. ๐โจ
๐ฆ where this page comes from
- ubuntu jammy: ec2-api-tools 1.6.14.1-0ubuntu1
- ubuntu noble: ec2-api-tools 1.6.14.1-0ubuntu2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms