AWS CLI vs Terraform

Imperative vs declarative.

Overview

AWS CLI and Terraform solve different problems despite both touching AWS APIs. The CLI is imperative: run a command, watch a side effect happen. Terraform is declarative: describe the desired state, let the planner reconcile reality with config. Use each for what it is good at; do not pretend one is a substitute for the other.

The approach

Default to Terraform for anything that creates persistent infrastructure. Reach for the CLI when the answer is "this is one-off and reversible."

Why this compounds

The right tool per task keeps paying back: infrastructure becomes reviewable, ad-hoc operations stay fast, and on-call has the right reflex for both kinds of work.