Skip to content

Instantly share code, notes, and snippets.

@JayGwod
Last active September 9, 2019 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayGwod/1078f1af87cd6a7a4930c9d8a1c695e3 to your computer and use it in GitHub Desktop.
Save JayGwod/1078f1af87cd6a7a4930c9d8a1c695e3 to your computer and use it in GitHub Desktop.
[Getting Started with AWS S3 CLI]#AWS

The video will cover the following:

Step 1: Install AWS CLI

sudo pip install awscli

Pre-req: Python 2 version 2.6.5+ or Python 3 version 3.3+

Pre-req: pip is installed

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

Step 2: Configure AWS Credentials (aws configure)

Step 3: Run AWS S3 CLI commands (Most common/useful commands)

  • Create/Remove bucket
  • Copy and sync files to S3
  • Browse S3 bucket
  • Others: view file content, recursive operations, bucket size
aws s3 ls s3://bucket/folder --recursive | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024" MB"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment