Lesson 26 / 28
Infrastructure as Code Awareness
Describe AWS infrastructure as reviewable, repeatable code with CloudFormation or Terraform.
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?
- Changes become reviewable, versioned, and repeatable
- It makes servers run faster
- It removes the need for IAM permissions
- It replaces IAM
Answer
Changes become reviewable, versioned, and repeatable — IaC turns infrastructure changes into code that can be reviewed, versioned, and reliably reapplied.