What's changed: In-scope coverage: added compute/scaling/storage (EC2 Auto Scaling/AWS Auto Scaling/ECS/Fargate/Lambda/S3)
4.3Automating Networks with IaC
Make networks reproducible in code—understand CloudFormation, CDK, Terraform, change sets/drift detection, and repeatable deployments. Eliminate manual click-ops drift.
Defining networks (VPC, subnets, routes, SGs, endpoints, TGW) as IaC (Infrastructure as Code) makes them repeatable, consistent, and auditable, preventing manual configuration drift.
4.3.1IaC tools and benefits
- CloudFormation: AWS-native declarative templates (YAML/JSON). Preview diffs with change sets before applying.
- CDK: author in a programming language to synthesize CloudFormation; easy to reuse.
- Terraform: multi-cloud IaC; manages resources via state.
- Drift detection: detect whether the live environment deviates from the template to preserve reproducibility.
Common on ANS-C01: build networks repeatably and consistently = IaC (CloudFormation/CDK/Terraform), preview diffs before applying = change sets, and detect manual deviation = drift detection. Manage production networks via IaC, avoiding manual click-ops changes.
Continue reading — free sign-up
You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.

