AWS CLI Cheat Sheet: Difference between revisions

From PUBLIC-WIKI
Jump to navigation Jump to search
(Created page with "* Configuring the AWS cli environment (using IAM roles and access/secret keys): : aws configure * Configure a profile for additional AWS IAM account: : aws configure --profile...")
 
No edit summary
Line 1: Line 1:
* Configuring the AWS cli environment (using IAM roles and access/secret keys):
* Configuring the AWS cli environment (using IAM roles and access/secret keys):
: aws configure
: '''aws configure'''''Italic text''
* Configure a profile for additional AWS IAM account:
* Configure a profile for additional AWS IAM account:
: aws configure --profile [profile_name]
: '''aws configure --profile [profile_name]'''''Italic text''
* Create a new S3 bucket:
* Create a new S3 bucket:
: aws s3 mb <BucketName>
: '''aws s3 mb <BucketName>'''''Italic text''
* Remove S3 bucket:
* Remove S3 bucket:
: aws s3 rb s3://<BucketName> --force
: '''aws s3 rb s3://<BucketName> --force'''''Italic text''
* List all S3 buckets:
* List all S3 buckets:
: aws s3 ls
: '''aws s3 ls'''''Italic text''
* List of S3 buckets using additional AWS IAM account:
* List of S3 buckets using additional AWS IAM account:
: aws s3 ls --profile [profile_name]
: '''aws s3 ls --profile [profile_name]'''''Italic text''
* List the content of specific S3 bucket:
* List the content of specific S3 bucket:
: aws s3 ls s3://<BucketName>
: '''aws s3 ls s3://<BucketName>'''''Italic text''
* Copy file from S3 bucket to local directory:
* Copy file from S3 bucket to local directory:
: aws s3 cp s3://<BucketName>/<FileName> /<LocalFolderName>
: '''aws s3 cp s3://<BucketName>/<FileName> /<LocalFolderName>'''''Italic text''

Revision as of 14:39, 12 March 2018

  • Configuring the AWS cli environment (using IAM roles and access/secret keys):
aws configureItalic text
  • Configure a profile for additional AWS IAM account:
aws configure --profile [profile_name]Italic text
  • Create a new S3 bucket:
aws s3 mb <BucketName>Italic text
  • Remove S3 bucket:
aws s3 rb s3://<BucketName> --forceItalic text
  • List all S3 buckets:
aws s3 lsItalic text
  • List of S3 buckets using additional AWS IAM account:
aws s3 ls --profile [profile_name]Italic text
  • List the content of specific S3 bucket:
aws s3 ls s3://<BucketName>Italic text
  • Copy file from S3 bucket to local directory:
aws s3 cp s3://<BucketName>/<FileName> /<LocalFolderName>Italic text