Skill 6.2.1
Use infrastructure as code (IaC) to deploy cloud resources consistently and securely across accounts (for example, CloudFormation stack sets, third-party IaC tools, CloudFormation Guard, cfn-lint)
Key Concepts
CloudFormation StackSets deploy a template to many accounts and Regions; service-managed permissions with Organizations deploy automatically to new accounts in target OUs. Use them for security baselines (roles, Config rules, logging). Third-party tools such as Terraform work the same way with their own state and policy tooling.
cfn-lint validates templates against the resource specification and best practices; CloudFormation Guard evaluates templates (and other JSON/YAML) against policy-as-code rules, for example "every S3 bucket must have encryption and block public access". Run both in pipelines; CloudFormation Hooks enforce checks at deployment time. Stack policies and termination protection protect critical stacks.