https://aws.amazon.com/

Configure aws CLI

OS X

You need to have homebrew installed

1
2
$ brew install awscli
$ aws configure

then put in your access ID & key (don’t know where to get, read IAM doc)

Reference:

Delete all pending queue items

1
$ aws sqs purge-queue --queue-url https://sqs.ap-southeast-1.amazonaws.com/123456789012/queue_name
Reference:

Use aws command with specific credentials

We can set multiple credentials in ~/.aws/credentials

1
2
3
4
5
6
7
8
9
10
11
[default]
aws_access_key_id=ABCDEFGHIJKLMNOPQRSTUVWXYZ
aws_secret_access_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[pf1]
aws_access_key_id=ZYXWVUTSRQPONMLKJIHGFEDCBA
aws_secret_access_key=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

[pf2]
aws_access_key_id=ABCDEFGHIJKLMESBM7VFCXU
aws_secret_access_key=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

We can specify with --profile option. e.g.

1
$ aws s3 ls --profile pf2
Reference: