aws Commands

S3

aws s3 cp

Copies a local file or S3 object to another location.

aws s3 cp

Examples:
Upload a file to an S3 bucket
aws s3 cp my-local-file.txt s3://my-bucket/
Download an object from an S3 bucket
aws s3 cp s3://my-bucket/data.csv .
Recursively copy a local directory to S3
aws s3 cp ./my-app s3://my-bucket/my-app --recursive
aws s3 sync

Syncs directories and S3 prefixes. Recursively copies new and updated files.

aws s3 sync

Examples:
Sync a local directory with an S3 bucket
aws s3 sync . s3://my-website-bucket
Sync an S3 bucket to a local directory and delete extra files
aws s3 sync s3://my-data-backup ./local-backup --delete

Ec2

aws ec2 describe-instances

Describes one or more of your instances.

aws ec2 describe-instances

Examples:
Describe all instances
aws ec2 describe-instances
Describe only running instances
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"
Get the public IP address and tags for a specific instance
aws ec2 describe-instances --instance-ids i-1234567890abcdef0 --query 'Reservations[*].Instances[*].[PublicIpAddress, Tags]'
aws ec2 start-instances

Starts an Amazon EBS-backed instance that you've previously stopped.

aws ec2 start-instances

Examples:
Start a single instance
aws ec2 start-instances --instance-ids i-1234567890abcdef0
aws ec2 stop-instances

Stops an Amazon EBS-backed instance.

aws ec2 stop-instances

Examples:
Stop a single instance
aws ec2 stop-instances --instance-ids i-1234567890abcdef0

Iam

aws iam list-users

Lists the IAM users that have the specified path prefix.

aws iam list-users

Examples:
List all IAM users in the account
aws iam list-users

Lambda

aws lambda list-functions

Returns a list of your Lambda functions.

aws lambda list-functions

Examples:
List all Lambda functions
aws lambda list-functions

Rds

aws rds describe-db-instances

Returns information about provisioned RDS instances.

aws rds describe-db-instances

Examples:
Describe all RDS database instances
aws rds describe-db-instances
Describe a specific RDS instance
aws rds describe-db-instances --db-instance-identifier my-db-instance

Cloudformation

aws cloudformation deploy

Deploys an AWS CloudFormation template by creating and then executing a change set.

aws cloudformation deploy

Examples:
Deploy a CloudFormation stack from a local template
aws cloudformation deploy --template-file my-template.yaml --stack-name my-new-stack --capabilities CAPABILITY_IAM