DevOps.Academy
CoursesCurriculumInterview prepPricing
◔My learningSign in
DevOps.Academy

Free, hands-on DevOps lessons. Made with care in India.

System status

Learn

All coursesLinux roadmapCurriculumInterview questionsCheat sheetsMy learning

Academy

PricingCertificates

Legal

PrivacyTermsContact

devops.rajeev.pro

AWS for DevOps · revision

AWS for DevOps cheat sheet

Recall first: read each stage's one-line summary and try to remember its commands. Then open the stage to check yourself.

17 stages31 commands

01Cloud basicsAWS resources live in a region and often in one of its Availability Zones. Choose a region deliberately, and know whether a service is IaaS, PaaS or SaaS before deciding what you operate.
  • aws sts get-caller-identity

    Confirm the active AWS account and caller identity

  • aws ec2 describe-regions --query "Regions[].RegionName" --output text

    List AWS regions available to the account

Remember

  • An Availability Zone is a distinct location inside a region.
  • Check account and region before creating or changing resources.

Watch for AWS CLI credentials can point at a different account or region than the console tab.

Open the lesson: Cloud basics: what you're actually renting →
02IAMIAM controls who can do what on which resources. Prefer roles and least-privilege policies, protect human sign-ins with MFA, and verify permissions instead of guessing.
  • aws iam get-account-summary --query 'SummaryMap.{Users:Users,MFADevices:MFADevices,AccountMFAEnabled:AccountMFAEnabled}'

    Check account-level IAM user and MFA summary counts

  • aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::111122223333:user/demo-dev \

    Start a policy simulation for a principal's permissions

Remember

  • A role is assumed for temporary credentials; avoid long-lived access keys where possible.
  • An explicit deny overrides an allow in IAM policy evaluation.

Watch for A policy simulator result does not prove that every runtime resource condition is satisfied.

Open the lesson: IAM: who can do what →
03EC2An EC2 instance combines an AMI, instance type, network placement, security group, storage and boot configuration. Verify access, then terminate temporary instances to stop compute charges.
  • aws ec2 wait instance-status-ok --instance-ids $ID

    Wait until the instance passes EC2 status checks

Remember

  • A key pair provides an SSH key; a security group controls network traffic.
  • An EBS-backed instance can be stopped and started; termination is a different lifecycle action.

Watch for Opening SSH to 0.0.0.0/0 exposes the port broadly; restrict it to the required source.

Open the lesson: EC2: your first server in the cloud →
04VPCA VPC is a regional network split into subnets in Availability Zones. Route tables, gateways, security groups, network ACLs and endpoints determine how traffic enters and leaves.
  • aws ec2 describe-vpcs --filters Name=tag:Name,Values=academy-vpc --query 'length(Vpcs)'

    Confirm whether the tagged lesson VPC exists

  • aws ec2 describe-route-tables --filters Name=vpc-id,Values=$V \

    Inspect route tables associated with the selected VPC

Remember

  • A public subnet's route table needs a route to an internet gateway; a public IP alone is not enough.
  • Security groups are stateful; network ACLs are stateless subnet controls.

Watch for A private subnet needs an intentional egress path, such as a NAT gateway, for outbound internet access.

Open the lesson: VPC: your own private network →
05Scaling & load balancingAn Application Load Balancer routes requests to healthy targets; an Auto Scaling group keeps the desired capacity running across Availability Zones and can replace failed instances.
  • aws autoscaling describe-scaling-activities --auto-scaling-group-name academy-asg --max-items 2 --query 'Activities[].Description'

    Review recent Auto Scaling group activity and replacement decisions

Remember

  • A target group health check determines whether a registered target receives traffic.
  • Scaling policies change desired capacity; they do not replace a useful health check.

Watch for A target can exist in a target group and still be unhealthy, so inspect target health.

Open the lesson: Scaling and load balancing →
06S3S3 stores objects in buckets. Bucket policy, public-access blocks, encryption, versioning and lifecycle rules determine who can read data and how long old versions remain.
  • aws s3api list-objects-v2 --bucket $BUCKET --query 'Contents[].{Key:Key,Size:Size,StorageClass:StorageClass}' --output table

    List object keys, sizes and storage classes in a bucket

  • aws s3api get-bucket-location --bucket $BUCKET --query LocationConstraint --output text

    Check a bucket's region

Remember

  • An object is addressed by its bucket and key.
  • Versioning preserves object versions; lifecycle rules can transition or expire them.

Watch for A presigned URL grants temporary access; it does not make a private object public permanently.

Open the lesson: S3: storage for everything →
07Storage typesChoose block storage for an instance-attached disk, EFS for shared file access, and instance store for temporary data. Verify encryption, snapshots and cleanup as part of the storage plan.
  • aws ec2 describe-volumes --region "$AWS_REGION" --volume-ids "$VOLUME_ID" \

    Inspect an EBS volume's type, size, encryption and attachment state

  • aws dlm get-lifecycle-policies --state ENABLED --region ap-south-1 \

    List enabled Data Lifecycle Manager snapshot policies

Remember

  • An EBS volume is Availability-Zone scoped.
  • Instance-store data is temporary and does not survive the instance lifecycle.

Watch for A snapshot is a recovery point, not proof that a restore procedure works.

Open the lesson: EBS, EFS and instance store →
08Route 53Route 53 hosted zones hold DNS records. Choose public or VPC-associated private visibility, then use routing policies and health checks only when the DNS behavior needs them.
  • aws route53 list-resource-record-sets --hosted-zone-id $Z --query 'ResourceRecordSets[].[Name,Type,ResourceRecords[0].Value]' --output text

    Inspect the records in a hosted zone

Remember

  • A records map names to IPv4 addresses; CNAME records alias one DNS name to another.
  • An Alias record is Route 53's extension for pointing a name at selected AWS resources.

Watch for A private hosted zone resolves only in associated VPCs; it does not publish public DNS.

Open the lesson: Route 53: DNS for your apps →
09CloudFrontCloudFront caches content at edge locations while fetching misses from an origin. Keep an S3 origin private with Origin Access Control, configure HTTPS, and invalidate only when needed.
  • aws cloudfront get-distribution-config --id "$DISTRIBUTION_ID" \

    Inspect the current distribution configuration before editing it

  • aws cloudfront create-invalidation --distribution-id E1ABCDEF --paths "/index.html"

    Request that CloudFront remove a cached object

Remember

  • Origin Access Control signs CloudFront requests to a private S3 origin.
  • Cache policies decide which request values form the cache key and how long content stays cached.

Watch for An invalidation does not fix a wrong origin or cache policy; correct the configuration first.

Open the lesson: CloudFront: a fast edge in front of your app →
10DatabasesChoose a database by access pattern: relational for structured transactions, DynamoDB for key-based NoSQL access, and a cache for disposable hot data. Plan capacity, backups and recovery.
  • aws dynamodb query --region "$AWS_REGION" --table-name "$TABLE" --index-name GSI1 \

    Query the table through its global secondary index

  • aws dynamodb scan --region "$AWS_REGION" --table-name "$TABLE" --query 'Items' --output json

    Read all items in the lesson table with a scan

Remember

  • Multi-AZ is for availability/failover; a read replica serves asynchronous read traffic.
  • DynamoDB key design starts from the access patterns the table must support.

Watch for A scan reads across the table; it is not a substitute for a key-based query at scale.

Open the lesson: Managed databases: RDS, DynamoDB, ElastiCache →
11ContainersPush images to ECR, define their runtime in an ECS task definition, and run tasks on Fargate. Choose EKS when Kubernetes compatibility or its ecosystem is a real requirement.
  • aws ecs describe-tasks --cluster "$CLUSTER" --tasks "$TASK" --query 'tasks[0].{Status:lastStatus,Definition:taskDefinition,Started:startedAt}' --output table

    Inspect a running ECS task's status and task definition

  • aws ecr create-repository --repository-name "$REPO" --image-scanning-configuration scanOnPush=true

    Create an ECR repository with scan-on-push enabled

Remember

  • The execution role lets ECS pull images and publish logs; the task role grants app permissions.
  • Fargate runs tasks without requiring you to manage EC2 container hosts.
  • Service Connect: services call a short name (http://api:80); a proxy in each task finds healthy tasks, balances and retries.
  • Turn on the deployment circuit breaker with rollback, so a broken release returns to the last working revision.

Watch for Do not put application AWS permissions on the execution role; use the task role.

Open the lesson: Containers on AWS: ECR, ECS and EKS →
12LambdaLambda runs a function with a role, package, memory and timeout. Choose a function URL or API Gateway for HTTP, and event sources such as SQS for asynchronous work.
  • aws lambda get-function-configuration --function-name "$FUNCTION" \

    Inspect the function's runtime configuration and state

  • aws lambda list-event-source-mappings --function-name "$FUNCTION" \

    Inspect event-source mappings configured for the function

Remember

  • The execution role supplies permissions to code while it runs.
  • An SQS event-source mapping polls messages and invokes the function in batches.

Watch for A public function URL needs an explicit authorization decision and should not be exposed by accident.

Open the lesson: Lambda: code without servers →
13Monitoring & auditingMetrics show measured values over time; logs hold event records. Use alarms for thresholds, dashboards for a focused view, and audit services to explain who changed what.
  • aws cloudwatch describe-alarms --profile $PROFILE --region $REGION --alarm-names $ALARM --query 'MetricAlarms[].StateValue'

    Check the current state of a named metric alarm

  • aws logs describe-log-groups --profile $PROFILE --region $REGION --log-group-name-prefix $LOG_GROUP --query 'logGroups[].logGroupName'

    Find log groups with the configured prefix

Remember

  • A metric needs a namespace, name, dimensions, statistic and time period to be interpreted.
  • CloudTrail records API activity; CloudWatch metrics and logs describe operational behavior.

Watch for Missing data is not automatically the same as a healthy metric; choose alarm treatment deliberately.

Open the lesson: Monitoring and auditing: CloudWatch, CloudTrail and Config →
14MessagingSQS queues decouple producers from workers; SNS topics fan out notifications to subscribers. Set a dead-letter queue for messages that repeatedly fail and confirm email subscriptions.
  • aws sqs get-queue-url --queue-name academy-messaging-demo

    Resolve the queue URL needed by later SQS commands

  • aws sqs get-queue-attributes --queue-url "$QUEUE_URL" --attribute-names RedrivePolicy

    Inspect a queue's dead-letter redrive policy

Remember

  • A queue retains messages until they are deleted or expire.
  • An SNS email subscription must be confirmed before it receives notifications.

Watch for Receiving a message does not delete it; delete it only after successful processing.

Open the lesson: Messaging: SES, SNS and SQS →
15Security & secretsKMS protects encryption keys, while Secrets Manager and Parameter Store hold sensitive values and configuration. Detection services report findings; they do not replace preventive controls.
  • aws kms list-aliases --query 'Aliases[?starts_with(AliasName, `alias/aws/`)].AliasName' --output text

    List AWS-managed KMS key aliases

  • aws ssm get-parameters --names "$PLAIN" "$SECURE" --with-decryption \

    Retrieve the lesson parameters, decrypting the SecureString value

Remember

  • Use AWS-managed keys when a customer-managed key is not required.
  • Parameter Store distinguishes String from SecureString; retrieval can request decryption.

Watch for Never place a retrieved secret value in source control, command output or a public log.

Open the lesson: Security and secrets: KMS, Secrets Manager and threat detection →
16Automation & IaCCloudFormation makes infrastructure changes reviewable and repeatable. Validate templates, preview changes with change sets, detect drift, and use Systems Manager for fleet operations.
  • aws cloudformation validate-template --template-body file://stack.yaml --query 'Parameters[].ParameterKey' --output text

    Validate a local CloudFormation template and list its parameters

  • aws cloudformation describe-stacks --stack-name academy-iac --query 'Stacks[0].[StackStatus,Outputs[0].OutputValue]' --output text

    Inspect a stack's state and first output

Remember

  • A change set previews a proposed stack update before execution.
  • Drift detection compares deployed resources with the stack's expected configuration.

Watch for A valid template can still fail at deployment because of permissions, quotas or service state.

Open the lesson: Automation and IaC: CloudFormation, CDK and Systems Manager →
17Cost basicsTreat cost as part of the design: review billing, set budgets and alerts, use Cost Explorer to find spend, and tag resources so teams can attribute it.
  • aws compute-optimizer get-enrollment-status --region ap-south-1 --query status

    Check whether the account is enrolled in Compute Optimizer

  • aws ce list-cost-allocation-tags --status Active --query 'CostAllocationTags[].TagKey'

    List active cost-allocation tag keys

Remember

  • A budget alert notifies you; it does not automatically cap AWS spending.
  • Cost-allocation tags need activation before they appear in cost reports.

Watch for Billing and Cost Explorer data can lag; a zero current total is not proof of zero future cost.

Open the lesson: Cost basics and the course project →
← Back to the AWS for DevOps course