xutil.dev
Login

AWS CLI Cheatsheet

Quick reference for AWS CLI commands covering EC2, S3, IAM, Lambda, CloudFormation, RDS, ECS, and general operations

56 commands

aws configure

Configure AWS CLI credentials and default settings

aws configure list

List current configuration values

aws sts get-caller-identity

Check IAM identity of current credentials

aws --profile

Execute with a named profile

aws --region

Execute command with specified region

aws --output

Specify output format (json/table/text/yaml)

aws --query

Filter output with JMESPath query

aws ec2 describe-instances

Describe EC2 instances

aws ec2 run-instances

Launch a new EC2 instance

aws ec2 start-instances

Start stopped EC2 instances

aws ec2 stop-instances

Stop EC2 instances

aws ec2 terminate-instances

Terminate (delete) EC2 instances

aws ec2 describe-security-groups

Describe security groups

aws ec2 create-key-pair

Create a key pair

aws ec2 describe-vpcs

Describe VPCs

aws ec2 describe-subnets

Describe subnets

aws ec2 create-image

Create AMI from EC2 instance

aws s3 ls

List S3 buckets or objects

aws s3 cp

Copy files to/from S3

aws s3 sync

Sync directory with S3 bucket

aws s3 mb

Create S3 bucket

aws s3 rb

Remove S3 bucket

aws s3 rm

Remove S3 objects

aws s3 presign

Generate presigned URL for S3 object

aws s3api put-bucket-policy

Set S3 bucket policy

aws iam create-user

Create IAM user

aws iam list-users

List IAM users

aws iam create-role

Create IAM role

aws iam attach-role-policy

Attach policy to IAM role

aws iam create-access-key

Create access key

aws iam list-policies

List IAM policies

aws sts assume-role

Assume an IAM role

aws lambda list-functions

List Lambda functions

aws lambda invoke

Invoke a Lambda function

aws lambda create-function

Create a Lambda function

aws lambda update-function-code

Update Lambda function code

aws lambda get-function

Get Lambda function configuration

aws lambda delete-function

Delete a Lambda function

aws cloudformation create-stack

Create CloudFormation stack

aws cloudformation update-stack

Update CloudFormation stack

aws cloudformation delete-stack

Delete CloudFormation stack

aws cloudformation describe-stacks

Describe stacks

aws cloudformation list-stacks

List stacks

aws cloudformation validate-template

Validate template syntax

aws rds describe-db-instances

Describe RDS instances

aws rds create-db-instance

Create RDS instance

aws rds create-db-snapshot

Create RDS snapshot

aws rds delete-db-instance

Delete RDS instance

aws rds modify-db-instance

Modify RDS instance configuration

aws rds describe-db-clusters

Describe Aurora clusters

aws ecs list-clusters

List ECS clusters

aws ecs list-services

List ECS services

aws ecs describe-tasks

Describe ECS tasks

aws ecs create-service

Create ECS service

aws ecs update-service

Update (deploy) ECS service

aws ecs register-task-definition

Register task definition