DEV Community

moogoo
moogoo

Posted on • Updated on

AWS command-line

some drafts for aws command...

Configure Account

ref: Named profiles for the AWS CLI

check ~/.aws/config for your profile settings.

get credentials from AWS console, and add key and secret_key to ~/.aws/credentials

change account (profile reference to .aws/config)

$ export AWS_PROFILE=my-profile 
Enter fullscreen mode Exit fullscreen mode

S3

check bucket list from specific account

$ aws s3 ls # not list, only ls
Enter fullscreen mode Exit fullscreen mode

dump bucket

$ aws s3 sync s3://my-bucket my-local-dir
Enter fullscreen mode Exit fullscreen mode

Top comments (0)