Skip to content

Instantly share code, notes, and snippets.

@ksomemo
Last active August 29, 2015 14:09
Show Gist options
  • Save ksomemo/93b87aa3e0dd9ba47cf4 to your computer and use it in GitHub Desktop.
Save ksomemo/93b87aa3e0dd9ba47cf4 to your computer and use it in GitHub Desktop.

AWS CLI

Install

pip install awscli
pip list | grep aws
awscli (1.6.0)

or from github

help

aws help
aws [options] <command> <subcommand> [parameters]

command

command is AVAILABLE SERVICES(aws help)

aws ec2 help

AVAILABLE COMMANDS

subcommand is AVAILABLE COMMANDS(aws command help)

ex:ec2

  • accept-vpc-peering-connection
  • allocate-address
  • etc

AVAILABLE COMMANDS help

subcommand help

aws ec2 accept-vpc-peering-connection help

よくあるヘルプが表示される

S3

aws s3 ls s3://mf.recommend
Unable to locate credentials. You can configure credentials by running "aws configure".

Configure

aws configure
AWS Access Key ID [None]: xxx
AWS Secret Access Key [None]: yyy/zzz
Default region name [None]: ap-southeast-1
Default output format [None]: json
cat ~/.aws/config
[default]
output = json
region = ap-southeast-1
cat ~/.aws/credentials
[default]
aws_access_key_id = xxx
aws_secret_access_key = yyy/zzz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment