HowTo: Install AWS CLI - AWS Command Line Interface
Amazon has introduced a new command line interface which interfaces with several of the services they provide. Let’s take a look at installing it.
Requires Python 2.6 or later.
Install options
We can use pip
:
Console - user@hostname ~ $
1
sudo pip install awscli
We can use easy_install
:
Console - user@hostname ~ $
1
sudo easy_install awscli
Or we can download it from github:
Console - user@hostname ~ $
1
2
3
git clone https://github.com/aws/aws-cli.git
cd aws-cli
sudo python setup.py install
Credentials
Can use the environment variables AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
. Or can use a configuration file which is found with the AWS_CONFIG_FILE
environment variable. Finally an IAM role could be used. See HowTo: Install AWS CLI - Security Credentials to see how to set these.
Help
Console - user@hostname ~ $
1
aws help
Console - user@hostname ~ $
1
aws ec2 help
Console - user@hostname ~ $
1
aws ec2 describe-instances help
Sample Command
Console - user@hostname ~ $
1
aws --region us-east-1 ec2 describe-availability-zones
Supported services
The full list of services the AWS CLI supports can be found in the Available Services section of the AWS CLI Command Reference.
Resources
Parts in this series
- HowTo: Install AWS CLI
- HowTo: Install AWS CLI - Prerequisites
- HowTo: Install AWS CLI - Security Credentials
- HowTo: Install AWS CLI - AWS Command Line Interface
- HowTo: Install AWS CLI - Amazon Auto Scaling
- HowTo: Install AWS CLI - Amazon CloudFormation
- HowTo: Install AWS CLI - Amazon CloudFront
- HowTo: Install AWS CLI - Amazon CloudWatch
- HowTo: Install AWS CLI - Amazon ElastiCache
- HowTo: Install AWS CLI - Amazon Elastic Compute Cloud (EC2) - AMI Tools
- HowTo: Install AWS CLI - Amazon Elastic Compute Cloud (EC2) - API Tools
- HowTo: Install AWS CLI - Amazon Elastic Load Balancing (ELB)
- HowTo: Install AWS CLI - Amazon Elastic MapReduce Ruby Client
- HowTo: Install AWS CLI - Amazon Identity and Access Management (IAM)
- HowTo: Install AWS CLI - Amazon Relational Data Services (RDS)
- HowTo: Install AWS CLI - Amazon Route 53 - cli53
- HowTo: Install AWS CLI - Amazon Route 53 - dnscurl.pl
- HowTo: Install AWS CLI - Amazon Simple Email Service (SES)
- HowTo: Install AWS CLI - Amazon Simple Notification Service (SNS)
- HowTo: Install AWS CLI - Amazon Simple Storage Service (S3) - s3cmd
- HowTo: Install AWS CLI - Amazon Simple Storage Service (S3) - s3curl.pl