Introduction
Clicking through a cloud console works for a first experiment. It stops working the moment you need the same environment in staging and production, a repeatable disaster recovery region, or an audit trail of who changed a security group and when. Infrastructure as Code (IaC) solves this by describing infrastructure in version-controlled text files that can be reviewed, tested, and applied the same way every time.
On AWS, the two dominant options are Terraform (HashiCorp, cloud-agnostic) and AWS CloudFormation (AWS-native). Both are declarative: you describe the desired end state, and the tool works out what to create, update, or delete.…