EC2-RUN-INSTANCES(1)

๐Ÿ“ฆ version 1.6.14.1, in ubuntu jammy, ubuntu noble

๐Ÿ’– 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 whatever AWS_ACCESS_KEY is set to in the environment (if it's set at all) ๐Ÿ”‘
  • -W, --aws-secret-key KEY โ€” your AWS Secret Access Key. defaults to the AWS_SECRET_KEY environment variable (if set) ๐Ÿคซ
  • -T, --security-token TOKEN โ€” AWS delegation token. defaults to the AWS_DELEGATION_TOKEN environment variable (if set) ๐ŸŽซ
  • -K, --private-key KEY โ€” [DEPRECATED] specify KEY as the private key to use. defaults to the value of the EC2_PRIVATE_KEY environment variable (if set), and overrides the default ๐Ÿ”
  • -C, --cert CERT โ€” [DEPRECATED] specify CERT as the X509 certificate to use. defaults to the value of the EC2_CERT environment variable (if set), and overrides the default ๐Ÿ“œ
  • -U, --url URL โ€” specify URL as the web service URL to use. defaults to https://ec2.amazonaws.com (us-east-1) or to the value of the EC2_URL environment variable (if set). overrides the default ๐ŸŒ
  • --region REGION โ€” specify REGION as the web service region to use. this option overrides the URL given by the -U URL option and the EC2_URL environment variable. it defaults to the region specified by the EC2_URL environment variable, or us-east-1 if 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 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 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:

  • SGs is a comma separated list of security group IDs.
  • DOT is either true or false, denoting whether to delete the interface on termination.
  • SIP count is the count of secondary private IP addresses.
  • SIPs is 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 ๐Ÿฆ‹


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