AWS CLI Cheat Sheet
Every AWS CLI command in the library, on one page. Search, filter by category, or jump to a full command reference for detailed examples.
| Command | Syntax | Description | |
|---|---|---|---|
| aws s3 cp | aws s3 cp <source> <destination> [--recursive] | Copies files to, from, or between S3 buckets. | |
| aws s3 sync | aws s3 sync <source> <destination> [--delete] | Synchronizes a local directory and an S3 bucket, uploading only changed files and optionally deleting removed ones. | |
| aws s3 ls | aws s3 ls [<s3-path>] | Lists S3 buckets or the objects within a bucket/prefix. | |
| aws ec2 describe-instances | aws ec2 describe-instances [--instance-ids <id>] | Describes one or more EC2 instances and their current state. | |
| aws ec2 start-instances | aws ec2 start-instances --instance-ids <id>... | Starts one or more stopped EC2 instances. | |
| aws ec2 stop-instances | aws ec2 stop-instances --instance-ids <id>... | Stops one or more running EC2 instances. | |
| aws configure | aws configure [--profile <name>] | Interactively sets up credentials, default region, and output format for the CLI. | |
| aws sts get-caller-identity | aws sts get-caller-identity | Shows which AWS identity (account/user/role) the current credentials belong to — the fastest way to check what you're authenticated as. | |
| aws logs tail | aws logs tail <log-group> [--follow] | Tails a CloudWatch Logs group, optionally following new events as they arrive. | |
| aws cloudfront create-invalidation | aws cloudfront create-invalidation --distribution-id <id> --paths <paths> | Invalidates cached objects in a CloudFront distribution so the next request re-fetches them from the origin. |