Skip to content

Instantly share code, notes, and snippets.

@olcortesb
Last active September 23, 2022 11:56
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 olcortesb/a471797eb1d45c54ad51d920b78aa664 to your computer and use it in GitHub Desktop.
Save olcortesb/a471797eb1d45c54ad51d920b78aa664 to your computer and use it in GitHub Desktop.

AWS CLI

Install AWS CLI

Install aws cli

Linux

$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ sudo ./aws/install

mac

$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /

version of aws cli

aws --version                                                                                                                 

Configure AWS CLI

$ aws configure

The values of configure command

AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json

AWS Access Key ID and AWS Secret Access Key -> link of how create Link

Default region name and Default output format -> in base at your preferences

Test AWS CLI

List all bucket of s3

aws s3 ls

List all elements of a bucket

aws s3 ls s3://mybucket --recursive --human-readable

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment