AWS Command Line tips

Use multiple profiles

It can be handy to use multiple AWS accounts from the commandline. Just wat to list buckets from different account. It’s easy:

$ aws configure --profile ams8aws-sbx
AWS Access Key ID []: AKIAQX87JDHHKEV7WZMJQ
AWS Secret Access Key []: 60EMvlrQSYZK8ItLk90dTX48RIjPzPp2cSMipg0x
Default region name [eu-west-1]:
Default output format [None]:
$ aws s3 ls --profile ams8aws-sbx

In this example you create one key but you can use any name which makes it very powerfull.