A mid-size gaming studio with 90 engineers manages 40 AWS accounts for dev, test, and live environments. Developers want to define VPCs and databases with Python classes and loops, but auditors require versioned templates, peer review, and deterministic rollbacks before any production change. How should the team standardize infrastructure as code?
Select an answer to reveal the explanation.
Short Explanation
Want code power without losing safety rails? You can write loops and classes while still shipping declarative templates reviewers can diff. CDK gives you a real language up front and CloudFormation gives you safe, repeatable deploys.
Full Explanation
The correct response succeeds because AWS CDK provides Python classes, loops, and reusable constructs while synthesizing to CloudFormation templates that can be versioned, peer reviewed, and rolled back deterministically across dev, test, and live, satisfying developer ergonomics and auditor controls for 40 accounts. The versioned Terraform modules practice is sound and widely adopted with pull request review and automation, yet it violates the explicit Python requirement since authoring centers on HCL rather than Python constructs. The direct CDK deployment with automated testing practice correctly uses Python reuse but violates audit control because pushing code straight to production without storing immutable templates for prior review removes the versioned artifact gate and stack rollback. The versioned Ansible playbook practice is proven for configuration management with Git history, review, and reapplication to correct drift, yet it lacks CloudFormation style deterministic rollback because rerunning procedures cannot atomically restore a prior template version. For exams, separate appealing automation from exact wording on language, versioned templates, and pre-production approval. As a practical check, confirm each production change promotes an immutable template with approval and restores the prior version in test.