How do you run production infrastructure as code across many accounts safely?
AdvancedProductionObservability, Deployments and Governance
Answer
Small state files per account, region and component (network, cluster, app), never one giant state. Remote state in S3 with versioning and native S3 state locking (use_lockfile = true in recent Terraform) or DynamoDB locking, in a dedicated account. Pipelines assume per-account deploy roles via OIDC. Plans are reviewed in pull requests, policy-as-code (OPA, Checkov, Sentinel) gates them, applies run only from the pipeline, and prod applies need approval.
More on Observability, Deployments and Governance
What should a production CloudWatch alarm strategy look like?IntermediateHow do you alert on an error-rate percentage instead of a raw count?IntermediateHow do you implement distributed tracing on AWS today?IntermediateHow do you define SLOs with AWS-native tools?AdvancedHow do you monitor from the user's perspective?BeginnerHow do you centralize observability across many accounts?Intermediate