The AWS CLI commands every developer should know are aws sts get-caller-identity to check who you are, aws s3 for files, aws ec2 describe-instances for servers, aws iam for permissions, aws logs tail for logs and aws help for documentation. Learning the shape of a command, aws <service> <operation> [options], matters more than memorising any single one, because the same pattern covers more than 300 services.
This guide lists the commands you will use daily, shows what their output looks like, and explains the patterns that make unfamiliar commands easy to find.
Every command has the same four parts: the program name, a service, an operation and options.
Here ec2 is the service, describe-instances is the operation and the two flags are options. Operations use kebab-case and usually start with a verb: list-, describe-, get-, create-, delete-, put-. A few options work on every command:
| Option | Purpose |
|---|---|
--profile | Use a named profile from ~/.aws |
--region | Override the Region for this call |
--output | json, yaml, text or table |
--query | Filter the result with JMESPath |
--dry-run | Check permissions without acting (only on some EC2 operations) |
--debug | Print request details when troubleshooting |
Run these first when something does not work. They tell you which account, user or role you are, and which settings are active.
get-caller-identity needs no special permission and is the fastest way to catch the classic mistake of running a command against the wrong account.
S3 has two command families. aws s3 offers high-level, file-system-like commands, and aws s3api exposes every raw API operation.
sync compares size and modification time and copies only what differs; add --delete to remove destination files that no longer exist locally, and run it with --dryrun first. presign prints a temporary URL so someone without AWS credentials can download one object.
The describe- operations are read-only and safe to run. Combine them with --query and --output table to get readable summaries.
Other describe and list commands worth knowing are aws ec2 describe-regions, aws rds describe-db-instances, aws lambda list-functions and aws cloudformation list-stacks.
IAM controls who may do what, so you will read it often and change it carefully.
Creating and deleting IAM entities should normally go through infrastructure as code, but reading with the CLI is the quickest way to answer "why was I denied?".
CloudWatch Logs has a live tail command in AWS CLI v2, which is far more convenient than polling.
In CLI v2, binary input such as --payload is treated as base64 by default, so --cli-binary-format raw-in-base64-out is needed when you pass plain JSON.
You never need to memorise the list. The built-in help is complete, offline and always matches your installed version.
Two other conveniences are command completion (aws_completer, set up through your shell) and the interactive --cli-auto-prompt flag in CLI v2, which suggests services and options as you type.
aws sts get-caller-identity before any command that changes or deletes.describe- and list- operations while exploring; they do not modify anything.--dry-run or --dryrun where it exists, and test on a non-production profile.--no-cli-pager or set AWS_PAGER="" in scripts so output does not wait inside less.Thousands of operations across hundreds of services, but they all follow aws <service> <operation>. You rely on aws help rather than memory.
aws s3 provides friendly commands such as cp and sync. aws s3api maps one-to-one to S3 API calls and is needed for settings like bucket policies and versioning.
Add --region eu-west-1 to the command, or set AWS_REGION or the profile's region value for the whole session.
Yes, AWS CloudShell in the console has the CLI preinstalled and already signed in as your console identity.
Learn the pattern aws <service> <operation> [options], then keep a short list of daily commands: sts get-caller-identity, s3 ls/cp/sync, ec2 describe-instances, iam list-*, logs tail and help. Combine --query, --output and --profile, and verify your identity before anything destructive.