This is a complete, hands-on Amazon Web Services cheat sheet: install, configure, operate, automate and secure it - with copy-paste commands grouped by task. Bookmark it for day-to-day work, incidents and interviews alike.
AWS is a broad public cloud spanning compute (EC2, ECS, EKS, Lambda), storage (S3, EBS), networking (VPC) and hundreds of managed services - best operated declaratively with IaC and least-privilege IAM.
Why you reach for it
- The widest set of managed services and regions
- Deep IAM and networking controls for secure platforms
- First-class IaC support via Terraform and CloudFormation
Installation
curl 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o awscli.zip
unzip awscli.zip && sudo ./aws/install
aws configure sso # prefer SSO over long-lived keysConfiguration reference
A least-privilege S3 read policy as Terraform.
data "aws_iam_policy_document" "read_assets" {
statement {
actions = ["s3:GetObject"]
resources = ["arn:aws:s3:::acme-assets/*"]
}
}
resource "aws_iam_policy" "read_assets" {
name = "read-assets"
policy = data.aws_iam_policy_document.read_assets.json
}Core commands you use daily
aws sts get-caller-identity
aws s3 ls
aws eks update-kubeconfig --name prod --region eu-west-1Identity & S3
aws configure sso
aws sts get-caller-identity
aws s3 ls
aws s3 sync ./dist s3://acme-site --delete
aws s3 cp file.txt s3://acme-bucket/EC2, EKS, logs
aws ec2 describe-instances --filters 'Name=tag:env,Values=prod' --query 'Reservations[].Instances[].InstanceId'
aws eks update-kubeconfig --name prod --region eu-west-1
aws logs tail /aws/lambda/fn --followUse it in CI/CD
Authenticate from CI with OIDC, not stored keys.
permissions: { id-token: write, contents: read }
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::1234:role/ci
aws-region: eu-west-1Best-practice checklist
- Use SSO for humans and OIDC roles for CI - no static keys
- Write least-privilege IAM and manage everything via IaC
- Turn on CloudTrail, GuardDuty and budget alerts
Common pitfalls to avoid
- Long-lived access keys instead of SSO/OIDC roles
- Over-broad IAM policies with wildcard actions and resources
- Public S3 buckets and security groups open to 0.0.0.0/0
Security quick wins
- Scan IaC (tfsec/Checkov) for open buckets and wide security groups
- Enforce MFA, rotate credentials, and enable org-wide guardrails (SCPs)
Works well with
- Terraform - Declarative, provider-agnostic infrastructure as code with a planned, reviewable change workflow.
- Kubernetes - Declarative orchestration for containers at scale - self-healing, rolling updates and service discovery.
- Google Cloud - A developer-friendly cloud strong in Kubernetes (GKE), data and AI/ML (Vertex AI).
A cheat sheet is muscle memory on paper - keep it close until the commands live in your fingers.
Want senior help putting Amazon Web Services to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.