Question #1348
A company needs to deploy a multi-tier application across multiple AWS regions using a reusable template that defines the entire infrastructure stack. Which AWS service should be used to ensure consistent and repeatable deployments?
AWS OpsWorks
AWS Elastic Beanstalk
AWS CloudFormation
AWS CodeDeploy
Explanation
AWS CloudFormation (Option C) is the correct answer because it enables infrastructure-as-code (IaC) by defining AWS resources in reusable JSON/YAML templates. These templates can provision multi-tier applications consistently across regions, ensuring repeatability and avoiding manual configuration errors.
Why other options are incorrect:
- A. AWS OpsWorks: Focuses on configuration management (Chef/Puppet) rather than infrastructure provisioning. It automates server setups but does not define full infrastructure stacks.
- B. AWS Elastic Beanstalk: Simplifies application deployment but abstracts infrastructure management. It is not designed for defining custom multi-tier architectures across regions.
- D. AWS CodeDeploy: Automates code deployment to instances but does not provision or manage infrastructure resources.
Key Points:
- CloudFormation templates are region-agnostic and support cross-region deployments.
- Infrastructure-as-code ensures version-controlled, repeatable, and auditable infrastructure.
- Multi-tier applications (e.g., web, app, database layers) require end-to-end stack definitions, which CloudFormation specializes in.
Answer
The correct answer is: C