Professional Documents
Culture Documents
Ec2 Commandline Quick Reference PDF
Ec2 Commandline Quick Reference PDF
(Version 2013-02-01)
Quick Reference Card (Page 1)
Instance Tools
ec2-run-instances (ec2run) ec2-terminate-instances (ec2kill) ec2-stop-instances (ec2stop)
Launches one or more instances of the specified AMI.
Terminates the specified instance. Stops an instance (applies only to Amazon EBS-backed
ec2-run-instances ami_id [-n instance_count]
ec2-terminate-instances instance_id instances).
[-g group [-g group ...]] [-k keypair] [-d [instance_id ...] ec2-stop-instances instance_id [instance_id ...]
user_data | -f user_data_file] [-t
instance_type] [-z availability_zone] [--
ec2-start-instances (ec2start)
kernel kernel_id] [--ramdisk ramdisk_id] [-b ec2-monitor-instances (ec2min)
block-device-mapping] [--monitor] [--disable- Starts a stopped instance (applies only to Amazon EBS-
Enables monitoring for the specified instance.
api-termination] [--instance-initiated- backed instances).
ec2-monitor-instances instance-id [instance_id
shutdown-behavior behavior] [--placement-group ec2-start-instances instance_id [instance_id
...]
placement_group] [--tenancy tenancy] [-s ...]
subnet] [--private-ip-address ip_address] [--
client-token token] [--network-interface ec2-describe-instance-attribute
networkinterface] [--secondary-private-ip- (ec2dinatt) ec2-unmonitor-instances (ec2umin)
address ip_address | --secondary-private-ip- Disables monitoring for the specified instance(s).
address-count count] [-p, --iam-profile Describes an attribute for the specified instance.
ec2-monitor-instances instance-id [instance_id
arn|name] | --ebs-optimized ec2-describe-instance-attribute instance_id { -
...]
-block-device-mapping | --ebs-optimized | --
ec2-describe-instances (ec2din) disable-api-termination | --group-id | --
Lists the specified instances. If no instance is instance-initiated-shutdown-behavior | -- EC2 Elastic IP Address Tools
specified, all your instances are listed. instance-type | --kernel | --product-codes | --
ec2-describe-instances [instance_id ...] ramdisk | --root-device-name | --source-dest-
ec2-allocate-address (ec2allocaddr)
[[--filter name=value] ...] check | --user-data }
Acquires an EC2 Elastic IP address for use with your
Amazon EBS Tools account.
ec2-allocate-address
ec2-create-volume (ec2addvol) ec2-create-snapshot (ec2addsnap)
Creates an Amazon EBS volume that can be attached ec2-describe-addresses (ec2daddr)
Creates a snapshot of an Amazon EBS volume and Lists both EC2 and VPC Elastic IP addresses assigned to
to any EC2 instance in the same Availability Zone. stores it in Amazon S3.
ec2-create-volume -z availability_zone your account.
ec2-create-snapshot volume_id ec2-describe-addresses [ip_address ...]
[-s size | --snapshot snapshot [--size size]]
-z –availability-zone zone [--type type [--
iops iops]] ec2-release-address (ec2reladdr)
ec2-describe-snapshots (ec2dsnap) Releases an EC2 Elastic IP address associated with your
ec2-describe-volumes (ec2dvol) Lists the specified snapshots. If no snapshot is account.
Lists the specified Amazon EBS volumes. If no volume specified, all your snapshots are listed. ec2-release-address ip_address
is specified, all your volumes are listed. ec2-describe-snapshots [snapshot_id ...]
ec2-describe-volumes [volume_id ...] [[--filter name=value] ...]
[[--filter name=value] ...]
ec2-associate-address (ec2assocaddr)
Associates an EC2 Elastic IP address with an instance. If
ec2-delete-volume (ec2delvol) ec2-delete-snapshot (ec2delsnap) the IP address is currently assigned to another instance,
Deletes the specified Amazon EBS volume. Deletes the specified Amazon EBS snapshot. the IP address is reassigned to the specified instance.
ec2-delete-volume volume_id ec2-delete-snapshot snapshot_id ec2-associate-address ip_address -i instance_id
ec2-attach-volume (ec2attvol)
Attaches an Amazon EBS volume to a running instance ec2-detach-volume (ec2detvol) ec2-disassociate-address (ec2disaddr)
and exposes it as the specified device. The volume Detaches an Amazon EBS volume from an instance. Disassociates the specified EC2 Elastic IP address from
and instance must be in the same Availability Zone. ec2-detach-volume volume_id [-i instance_id [-d the instance to which it is assigned.
ec2-attach-volume volume_id -i instance_id device]] [--force] ec2-disassociate-address ip_address
-d device
Revised: 3/8/2013
(Version 2013-02-01)
Quick Reference Card (Page 2)