Commands to get started with Amazon EC2

Here are some simple commands to get you started with using Amazon EC2:

Displays your account’s AMIs that are on Amazon

ec2run ami-XXXXXXXX
This launches your Amazon EC2 instance. Use your own or one of Amazon’s AMI IDs

Describes your running instances with AMI and instance IDs

Lists your account’s volumes and their status

ec2attvol vol-XXXXXXXX -i i-XXXXXXXX -d xvdf
Attaches an Elastic Block Storage device to your running instance

ec2detvol i-XXXXXXXX
Detaches the storage volume from an instance (use -f to force)

ec2stop i-XXXXXXXX
Stops a running instance so that you can perform maintenance on it

ec2minatt i-XXXXXXXX
Modifies an instance attribute such as the instance type

ec2start i-XXXXXXXX
Resumes your stopped instance

ec2kill i-XXXXXXXX
Terminates your running instance