#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
☁️ FREE · 34 COMMANDS

AWS CLI Cheat Sheet: Everyday AWS From Your Terminal

Copy-ready AWS CLI commands for S3, EC2, IAM, Lambda and more, with notes on the flags that trip people up.

  • 🪣 S3
  • 🖥️ EC2 and --query
  • λ Lambda

How to use the AWS CLI Cheat Sheet

  1. 1. Search or browseType what you want to do, or pick one section of the AWS CLI cheat sheet.
  2. 2. CopyEvery entry has its own Copy button, so it goes straight into your editor or notes.
  3. 3. DownloadSave the whole AWS CLI cheat sheet as plain text or Markdown for offline revision.

What's in it

Commands are for AWS CLI version 2, the current major version. Bucket names, IDs and account numbers are placeholders to replace with your own. The 34 commands are organised into 10 sections: Setup & identity, S3, EC2, IAM, Lambda, Logs & monitoring, Infrastructure, Containers, Secrets, Help.

Each AWS service and command name was checked against the AWS CLI's built-in help.

Example

List only the useful bits of your instances: aws ec2 describe-instances --query "Reservations[].Instances[].[InstanceId,State.Name,PublicIpAddress]" --output table. The --query part is JMESPath. It walks into Reservations, then Instances, and picks three fields from each, so you get a neat three-column table instead of hundreds of lines of JSON.

Tips for using it

  • Run aws sts get-caller-identity before anything destructive to be sure you're in the right account.
  • Prefer aws configure sso or roles over long-lived access keys on laptops.
  • Add --dryrun to s3 cp, sync and rm to see what would happen first.

A quick look, one entry per section

  • Setup & identity: aws configure (set access key, secret, default region and output format)
  • S3: aws s3 ls s3://my-bucket/reports/ (list objects under a prefix)
  • EC2: aws ec2 describe-instances --filters Name=instance-state-name,Values=running (running instances)
  • IAM: aws iam list-users (list IAM users)
  • Lambda: aws lambda list-functions --query "Functions[].FunctionName" (function names)
  • Logs & monitoring: aws logs tail /aws/lambda/hello --follow (stream CloudWatch logs (CLI v2))
  • Infrastructure: aws cloudformation deploy --template-file stack.yaml --stack-name app --capabilities CAPABILITY_IAM (create or update a CloudFormation stack)
  • Containers: aws ecr get-login-password | docker login --username AWS --password-stdin 123456789012.dkr.ecr.ap-south-1.amazonaws.com (log Docker in to your ECR registry)
  • Secrets: aws secretsmanager get-secret-value --secret-id prod/db --query SecretString --output text (read a secret's value)

Search the box above for the rest of the AWS CLI entries, or download the full sheet.

Frequently asked questions

Were the commands checked?

Each service and command name was checked against the AWS CLI's built-in help. Two v2-only commands, configure sso and logs tail, are marked in their descriptions.

Why ap-south-1?

It is the Mumbai region, a common choice for apps serving users in India. Use whichever region you deploy to.

Is the AWS CLI cheat sheet free?

Yes. You can search, read and copy every entry in the AWS CLI cheat sheet without signing up. The first time you download it, we ask once for your name and WhatsApp number; after that downloads and every other Uncodemy tool open straight away.

More free tools

See all free tools