Lesson 24 / 26
Infrastructure as Code Awareness
Describing your AWS resources as reviewable, repeatable code.
Why IaC
Infrastructure as Code describes your AWS resources in a file instead of clicking through the console — so infra changes go through review, version control, and repeatable deploys, like application code.
A minimal snippet
Defining one S3 bucket declaratively with Terraform.
resource "aws_s3_bucket" "app" {
bucket = "my-app-bucket"
}
Output:
terraform apply creates (or updates) exactly this bucket
CloudFormation vs Terraform
CloudFormation is AWS-native, no extra tooling needed. Terraform is a popular third-party tool that works across multiple clouds using the same language — pick based on whether you need multi-cloud.
Quick check: What is the main benefit of describing infrastructure as code instead of clicking through the console?
- It makes servers run faster
- Changes become reviewable, versioned, and repeatable
- It removes the need for IAM permissions
Answer
Changes become reviewable, versioned, and repeatable — IaC turns infrastructure changes into code that can be reviewed, versioned, and reliably reapplied.