AWS Certified Solutions Architect - Associate / Question #1498 of 1019

Question #1498

A company has an existing production environment in AWS that includes an Auto Scaling group, an Application Load Balancer, and an Amazon RDS database. They want to automate the deployment of an identical staging environment in two Availability Zones while ensuring consistency and minimizing manual configuration.

What should a solutions architect recommend to achieve this?

A

Use AWS OpsWorks to define the infrastructure and deploy it across two Availability Zones.

B

Create an AWS CloudFormation template based on the existing infrastructure and deploy it to the target environments.

C

Utilize AWS CodeDeploy to automate the provisioning of the staging environment in the required Availability Zones.

D

Configure AWS Systems Manager Automation documents to replicate the production environment into the staging environment.

Explanation

The correct answer is B because AWS CloudFormation is designed to automate the creation of AWS resources using declarative templates. This ensures consistency between environments (e.g., production and staging) by codifying infrastructure like Auto Scaling groups, Load Balancers, and RDS databases.

- Why B is correct: CloudFormation templates capture the entire infrastructure configuration, enabling repeatable deployments. The staging environment can be deployed in two Availability Zones by specifying parameters in the template, minimizing manual configuration.
- Why others are incorrect:
- A (OpsWorks): Focuses on configuration management (Chef/Puppet) rather than full infrastructure provisioning. It requires manual setup for resources like RDS and Load Balancers.
- C (CodeDeploy): Deploys application code to existing infrastructure but does not provision infrastructure components like Auto Scaling groups or RDS.
- D (Systems Manager Automation): Primarily automates operational tasks (e.g., patching, backups) but lacks native support for defining complex infrastructure stacks.

Key Points: Use CloudFormation for IaC to ensure environment consistency, automate deployments, and reduce manual errors.

Answer

The correct answer is: B