Name

ec2-run-instances

Synopsis

ec2-run-instances imageid [-n count] [-g groupname1 [... -g groupnameN]] 
[-k keypair] -d customdata | -f customfile] [ -t type] [ -z zone] 
[ --kernel kernelid] [ --ramdisk ramdiskid] [ -B devicemapping]

Attempts to launch one or more EC2 instances based on the AMI and options specified. The options are:

-B devicemapping

Defines how block devices are exposed to the instances being launched. You can specify a number of different virtual names:

  • ami: the root filesystem device as seen by the instance

  • root: the root filesystem device as seen by the kernel

  • swap: the swap device as seen by the instance

  • ephemeralN: the Nth ephemeral store

-d customdata

Data to be made available to your instance at runtime. If you need to specify a lot of data, specify the data in a file and use the -f option.

-f customfile

The name of a file with runtime data to be made available to your instances post launch.

-g groupname

The name of the security group whose rules govern the launched instance(s). You may specify multiple security groups. If you specify multiple security groups, access to the instance is governed by the union of the permissions associated with those groups.

-k keypair

The public key for EC2 to place on launched instances at boot.

--kernel kernelid

The kernel ID with which to launch the instances.

-n count

The minimum number of instances to launch with this command. If EC2 cannot minimally launch the number of instances specified, it will not launch any at all.

--ramdisk ramdiskid ...

Get Cloud Application Architectures now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.