--- title: AWS CLI tips disqus: pierodibello --- ###### tags: `AWS` ## List all the s3 buckets: `aws s3 ls` ```shell aws s3 ls ``` Just add the `--profile <profile-name>` to execute the same command using the given AWS profile (as defined in your `.aws` folder) e.g. list all the s3 buckets for the `xpeppers-profile`: ```shell aws s3 ls --profile xpeppers-develop ``` ## Copy the content of a bucket object into a local folder (`aws s3 cp`) `aws s3 cp` copies s3 objects. e.g. copy the `votes` object of the `happiness-index-pietro-dibello` bucket in the current folder (`.`). ```shell aws s3 cp s3://happiness-index-pietro-dibello/votes . --profile xpeppers-develop ``` ## Create / delete buckets (`mb` / `rb`) ```shell aws s3 mb s3://test-ganzodigomma --profile xpeppers-develop ``` ```shell aws s3 rb s3://test-ganzodigomma --profile xpeppers-develop ```