📋 AWS CloudFormation Cheat Sheet

Quick-reference for CloudFormation templates, stacks, stack sets, drift detection, custom resources, and best practices for IaC at scale.

Why This Cheat Sheet Matters for DOP-C02

This cheat sheet covers the most important CloudFormation concepts tested on the DOP-C02 (AWS DevOps Engineer Professional) certification exam. It contains 4 sections with 16 key points that you should memorize before exam day. Practice infrastructure as code with templates, stacks, stack sets, change sets, drift detection, nested stacks, custom resources, and cross-stack references. Use this as a quick-reference guide during your final review sessions.

4Sections
16Key Points

Template Anatomy

  • AWSTemplateFormatVersion, Description, Parameters, Mappings, Conditions, Resources (required), Outputs
  • Intrinsic functions: !Ref, !GetAtt, !Sub, !Join, !Select, !If
  • Pseudo parameters: AWS::Region, AWS::AccountId, AWS::StackName
  • Max template size: 51,200 bytes (S3) or 460,800 bytes (body)

Stack Sets

  • Deploy stacks across multiple accounts and regions
  • Service-managed (Organizations) or self-managed permissions
  • Deployment options: parallel/sequential, failure tolerance, max concurrency
  • Auto-deployment: new accounts automatically get the stack

Drift Detection

  • Detects changes made outside CloudFormation
  • Resource-level and stack-level drift status
  • IN_SYNC, MODIFIED, DELETED, NOT_CHECKED
  • Cannot detect drift on all resource types

Advanced Features

  • Custom resources: Lambda-backed for unsupported resources
  • Change sets: preview updates before execution
  • Nested stacks: reusable components, parent-child relationships
  • DeletionPolicy: Retain, Snapshot, Delete

Practice CloudFormation Questions

Put your knowledge to the test with practice questions.

More DOP-C02 Cheat Sheets