Summary
This chapter covered two critical AWS services for managing infrastructure as code. CloudFormation allows you to define and deploy AWS resources using YAML or JSON templates. The AWS CDK is a software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation.
This chapter explained the main components of CloudFormation and the AWS CDK and provided a sample CloudFormation template that creates a VPC with subnets, gateways, route tables, and security groups.
The chapter also highlighted some best practices for using CloudFormation, such as defining and testing templates before deployment, creating change sets, and strategies for varying configuration options such as StackSets and nested stacks, and discussed the CloudFormation template anatomy in detail.
CloudFormation and the CDK can help you create repeatable and reproducible applications and infrastructure solutions in minutes. You avoid configuration drift and...