SOA-C02 Question 155
Single answerA company wants to automate the deployment of a web application stack in multiple AWS accounts and regions. The stack includes an Amazon EC2 instance, an Amazon RDS database, and an Application Load Balancer. The company also requires the solution to be repeatable and ensure consistency across deployments. Which approach should be used to meet these requirements?
- A
Use AWS CloudFormation to define the stack as a template and deploy it across accounts and regions.
- B
Manually create the resources in each account and region using the AWS Management Console.
- C
Write custom scripts to deploy the resources using the AWS CLI and run them in each account and region.
- D
Use AWS Systems Manager Automation to create a runbook for deploying the resources across accounts and regions.
Show answer and explanation
Correct answer: A
Explanation
AWS CloudFormation is the ideal solution for automating the deployment of multi-resource stacks across multiple accounts and regions. By using templates to define the stack, it ensures consistency, reduces human error, and enables repeatable deployments. Other options involve manual effort, higher maintenance, or are not designed for full-stack deployments.
- A. Correct.
Correct. AWS CloudFormation allows you to define your infrastructure as code using templates, ensuring consistent and repeatable deployments across multiple accounts and regions.
- B. Incorrect.
Incorrect. Manually creating resources using the AWS Management Console is error-prone, time-consuming, and does not ensure consistency or automation.
- C. Incorrect.
Incorrect. While custom scripts with the AWS CLI can automate deployments, they require significant effort to maintain and do not inherently ensure consistency like CloudFormation templates do.
- D. Incorrect.
Incorrect. AWS Systems Manager Automation is useful for specific operational tasks but is not intended for defining and deploying entire infrastructure stacks.