Skill 3.3.4

Implement and deploy infrastructure as code (IaC) templates (for example, AWS SAM templates, AWS CloudFormation templates)

Key Concepts

CloudFormation templates declare resources, parameters, conditions and outputs, and CloudFormation works out the order of creation from references between them. AWS SAM adds compact serverless resource types and is deployed with sam build and sam deploy, while the AWS CDK lets you define the same infrastructure in programming languages and synthesises CloudFormation templates with cdk synth before cdk deploy.

Templates can be validated with cfn-lint and aws cloudformation validate-template, and Lambda code can be packaged and uploaded to S3 with sam package or aws cloudformation package. In a pipeline, CodePipeline's CloudFormation actions create or execute change sets.