See also: Installing AWS Command Line Tools from Amazon Downloads
Here are the steps for installing the AWS command line tools that are
currently available as Ubuntu packages. These include:
EC2 API tools
EC2 AMI tools
IAM - Identity and Access Management
RDS - Relational Database Service
CloudWatch
Auto Scaling
ElastiCache
Starting with Ubuntu 12.04 LTS Precise, these are also available:
CloudFormation
ELB - Elastic Load Balancer
Install Packages
Enable the multiverse repository. This can be done through the Ubuntu
Update Manager or by editing /etc/apt/sources.list Here are some
commands that will enable multiverse on a new installation:
Enable the awstools PPA and update the apt package index:
Install available AWS command line tool packages:
Some of these tools support passing in credentials on the command
line, but for regular use, you will want to store the AWS credentials
in files.
Set up AWS Credentials
Create a place to store the AWS credentials:
Copy your AWS X.509 certificate and private key to
this subdirectory. These files will have names that look something
like this:
Create the file $HOME/.aws/aws-credential-file.txt with your AWS
access key id and secret access key in the following
format:
Add the following lines to your $HOME/.bashrc file so that the AWS
command line tools know where to find the above files:
Make sure these are set in your current shell(s):
Test
Make sure that the command line tools are installed and have
credentials set up correctly. These commands should not return
errors:
AWS Command Line Tools
The table below shows some of the various AWS products, whether Amazon
publishes command line tools, and whether these are available in key
Ubuntu releases. Some of the packages are available in the standard
apt repositories, some require adding multiverse, and
some are published in the awstools PPA. The awstools PPA also
has newer versions of some of the packages released by Amazon after
the official Ubuntu release.
AWS Service
Amazon Command Line Tools
Ubuntu 12.04 LTS Precise
Ubuntu 11.10 Oneiric
Ubuntu 10.04 LTS Lucid
EC2 API Tools
AWS CLI
multiverse
multiverse
PPA updates
multiverse
PPA updates
EC2 AMI Tools
AWS CLI
multiverse
multiverse
PPA updates
multiverse
PPA updates
IAM - Identity and Access Management
AWS CLI
main
main
PPA
RDS - Relational Database Service
AWS CLI
main
main
PPA
CloudWatch
AWS CLI
PPA
PPA
PPA
Auto Scaling
AWS CLI
PPA
PPA
PPA
ElastiCache
AWS CLI
PPA
PPA
PPA
ELB - Elastic Load Balancing
AWS CLI
PPA
-
-
AWS CloudFormation
AWS CLI
PPA
-
-
AWS Import/Export
AWS CLI
-
-
-
CloudFront
AWS CLI
-
-
-
CloudSearch
AWS CLI
-
-
-
Elastic Beanstalk
AWS CLI
-
-
-
SNS - Simple Notification Service
AWS CLI
-
-
-
EMR - Elastic MapReduce
AWS CLI
-
-
-
Route 53
AWS CLI
-
-
-
S3 - Simple Storage Service
AWS CLI
-
-
-
SES - Simple Email Service
-
-
-
Direct Connect
-
-
-
-
DynamoDB
-
-
-
-
SimpleDB
-
-
-
-
SQS - Simple Queue Service
-
-
-
-
Storage Gateway
-
-
-
-
SWF (Simple Workflow Service)
-
-
-
-
VPC (Virtual Private Cloud)
-
-
-
-
As you can see, there are a number of command line tools that are not
(yet) packaged in Ubuntu. These can be downloaded directly from
Amazon and installed manually.
There are also a number of AWS services that do not have command line
tools available from Amazon, though some third parties have provided
helpful alternatives.
[Update 2012-09-03: Added links to command line tools for S3, SNS]
[Update 2013-03-10: Added CloudWatch, Auto Scaling, ElastiCache]
Original article:
http://alestic.com/2012/05/aws-command-line-packages