Module Objective: Automate the provisioning and management of a cloud architecture using infrastructure as code and AWS management tools.
Builds on Module 9: Elasticity and high availability depend on infrastructure that can be provisioned and reproduced automatically — this module supplies that automation.
Infrastructure as Code
Infrastructure as code (IaC) means defining infrastructure — VPCs, EC2 instances, RDS databases, IAM roles — in a version-controlled template rather than by manually clicking through the console, so an entire architecture can be reproduced consistently and repeatedly.
| Manual Provisioning | Infrastructure as Code |
|---|---|
| Steps are undocumented unless written down separately | The template itself is the documentation |
| Hard to reproduce identically in another Region or account | Deploy the same template anywhere |
| Configuration drift is easy to introduce | Re-deploying the template corrects drift |
AWS CloudFormation
AWS CloudFormation is AWS's native infrastructure-as-code service: a JSON or YAML template describes the desired resources, and CloudFormation creates, updates, or deletes them as a single managed unit called a stack.
| Concept | What It Means |
|---|---|
| Template | The JSON/YAML file describing desired resources and their configuration |
| Stack | A collection of resources created and managed together from one template |
| Change set | A preview of what a template update would actually change before applying it |
AWS Elastic Beanstalk Revisited
As covered in AWS Academy Cloud Foundations Module 6, Elastic Beanstalk automates provisioning for application code specifically, while CloudFormation automates provisioning for arbitrary infrastructure — Elastic Beanstalk actually uses CloudFormation underneath to do so.
AWS Systems Manager
AWS Systems Manager provides operational tooling for managing already-running infrastructure — patching, running commands across a fleet of instances, and centralizing configuration and secrets — complementing the provisioning-time automation CloudFormation provides.
| Systems Manager Feature | What It Does |
|---|---|
| Run Command | Executes commands across a fleet of instances without SSH access |
| Patch Manager | Automates operating system and software patching |
| Parameter Store | Centralizes configuration values and secrets for applications to retrieve securely |
Key Terms for Module 10
- infrastructure as code (IaC)
- Defining infrastructure in a version-controlled template rather than provisioning it manually
- AWS CloudFormation stack
- A collection of AWS resources created and managed together from one template
- change set
- A preview of what a CloudFormation stack update would change before it's applied
- AWS Systems Manager
- A service for operational tasks — patching, running commands, and managing configuration — on already-running infrastructure
Review Questions
- What problem does infrastructure as code solve that manual console provisioning doesn't?
- What is a CloudFormation stack, and what does a change set let an architect verify before applying it?
- How does AWS Elastic Beanstalk relate to AWS CloudFormation underneath?
- What is the difference in purpose between AWS CloudFormation and AWS Systems Manager?