Back to Cheatsheet Grid
AWS 9 Commands

AWS CLI Cheatsheet

Control AWS services via the terminal: S3 buckets, EC2 compute instances, IAM roles, Lambda scripts, and RDS queries.

S3 Storage Operations

aws s3 ls

List all S3 buckets linked to authenticated credentials.

aws s3 ls
aws s3 cp [src] s3://[bucket]

Copy local files to target S3 storage bucket.

aws s3 cp index.php s3://my-bucket-001/index.php
aws s3 sync [dir] s3://[bucket]

Synchronize local directories with S3 repositories recursively.

aws s3 sync ./assets s3://my-static-assets/assets
aws s3 rm s3://[bucket]/[file]

Delete files from S3 buckets.

aws s3 rm s3://my-bucket/temp.log

EC2 Instance Management

aws ec2 describe-instances

Query EC2 instances, showing IP mappings and statuses.

aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"
aws ec2 start-instances --instance-ids [ids]

Start one or more EC2 instances.

aws ec2 start-instances --instance-ids i-0a1b2c3d4e5f6g7h8
aws ec2 stop-instances --instance-ids [ids]

Stop active EC2 instances.

aws ec2 stop-instances --instance-ids i-0a1b2c3d4e5f6g7h8

Security & Serverless

aws lambda list-functions

List all Lambda functions deployed in active AWS regions.

aws lambda list-functions --max-items 10
aws iam list-users

Query active user registers defined in AWS IAM directories.

aws iam list-users