2015年9月28日月曜日

Install and update aws cli

AWS Command Line Interface Documentation
http://aws.amazon.com/documentation/cli/

This is how to for install new version of AWS CLI.
Environment: CentOS6

Install aws cli with Python pip
# yum install python-setuptools
# easy_install pip
# pip install awscli
# aws --version
# aws-cli/1.8.7 Python/2.6.6 Linux/2.6.32
# aws configure
AWS Access Key ID [None]: xxxx
AWS Secret Access Key [None]: xxxx
Default region name [None]: ap-northeast-1
Default output format [None]: 
Check local config file
# cat .aws/config 
[default]
region = ap-northeast-1
# cat .aws/credentials 
[default]
aws_access_key_id = xxx
aws_secret_access_key = xxx
Do test with s3 ls
# aws s3 ls 
2015-09-11 08:31:13 my-cloudtrail
2015-04-08 03:38:40 my-public
2015-04-14 14:47:05 my-spark-test

Update aws cli by pip
# aws --version
aws-cli/1.7.25 Python/2.6.6 Linux/2.6.32
# pip install --upgrade awscli
# aws --version
aws-cli/1.8.7 Python/2.6.6 Linux/2.6.32
# aws configure
AWS Access Key ID [None]: xxxx
AWS Secret Access Key [None]: xxxx
Default region name [None]: ap-northeast-1
Default output format [None]: 

Title image from Emanuele Cento Canesio