SOA-C02 Question 124
Single answerAn organization wants to automate the deployment of an application stack consisting of an EC2 instance, an RDS database, and an Elastic Load Balancer (ELB). They also want to ensure that the infrastructure can be easily recreated in another AWS Region if needed. Which AWS service and approach would be the best fit for this requirement?
- A
Use AWS Elastic Beanstalk to define and deploy the application stack
- B
Use AWS OpsWorks to manage and deploy the application stack
- C
Write an AWS CloudFormation template to define the infrastructure as code and deploy the stack
- D
Manually configure and deploy the resources through the AWS Management Console
Show answer and explanation
Correct answer: C
Explanation
AWS CloudFormation is the best service for this scenario because it allows you to define your infrastructure as code in a reusable template. This ensures the infrastructure can be easily deployed and replicated in other AWS Regions, meeting the organization's requirements for automation, consistency, and portability. Other services like Elastic Beanstalk and OpsWorks serve different purposes, and manual deployment lacks the benefits of automation and repeatability.
- A. Incorrect.
AWS Elastic Beanstalk is an abstraction layer primarily designed for deploying web applications and does not provide the same level of control for defining specific infrastructure resources like RDS, EC2, or ELB.
- B. Incorrect.
AWS OpsWorks is a configuration management service that uses Chef or Puppet but does not directly support Infrastructure as Code (IaC) with the same flexibility and portability as CloudFormation.
- C. Correct.
AWS CloudFormation enables Infrastructure as Code (IaC), allowing you to define and deploy the infrastructure stack in a JSON or YAML template. This approach ensures consistency and allows the stack to be easily replicated across regions.
- D. Incorrect.
Manually configuring and deploying resources through the AWS Management Console is time-consuming, error-prone, and does not allow for easy reproduction or automation of the infrastructure stack.