Getting everything ready for you…

Loading courses, problems and your progress. This takes just a moment.

0s

AWS Cheat Sheet

Setup and identity

aws configure
aws configure sso
aws sts get-caller-identity
aws iam list-users
export AWS_PROFILE=dev

S3

aws s3 mb s3://bucket-name
aws s3 cp file.txt s3://bucket-name/path/
aws s3 sync ./dist s3://bucket-name --delete
aws s3 ls s3://bucket-name --recursive
aws s3 presign s3://bucket-name/file.pdf --expires-in 3600
aws s3 rb s3://bucket-name --force

EC2

aws ec2 describe-instances --output table
aws ec2 start-instances --instance-ids i-123
aws ec2 stop-instances --instance-ids i-123
aws ec2 terminate-instances --instance-ids i-123
ssh -i key.pem ubuntu@<public-ip>

Lambda and logs

aws lambda list-functions
aws lambda invoke --function-name fn out.json
aws logs tail /aws/lambda/fn --follow
aws cloudwatch describe-alarms

Containers

aws ecr create-repository --repository-name app
aws ecr get-login-password | docker login --username AWS --password-stdin <acct>.dkr.ecr.<region>.amazonaws.com
aws ecs list-clusters
aws eks update-kubeconfig --name my-cluster

Full AWS documentation