Q58 — AWS DOP-C02 Ch.3
Question 58 of 100 | ← Chapter 3
A company runs a three-tier web application in a production environment, built on a single AWS CloudFormation template. The application consists of Amazon EC2 instances behind an Elastic Load Balancing (ELB) Application Load Balancer, running in an EC2 Auto Scaling group across multiple Availability Zones. Data is stored in an Amazon RDS multi-AZ database instance with read replicas. Amazon Route 53 manages the application’s public DNS records. A DevOps engineer needs to create a workflow to enable safe software deployments for new application versions, allowing rapid rollback in production if deployment failures occur. Which steps should the engineer perform to meet these requirements with minimal downtime?
- A. Deploy an additional staging environment using AWS CloudFormation and configure Route 53 DNS with weighted records. During cutover, adjust Route 53 A-record weights to distribute traffic evenly between the two environments. Validate traffic in the new environment, and immediately terminate the old environment upon successful testing.
- B. Use a single AWS Elastic Beanstalk environment to host both staging and production environments. Update the environment by uploading a ZIP file containing the new application code. Swap the Elastic Beanstalk environment CNAMEs. Validate traffic in the new environment, and immediately terminate the old environment upon successful testing.
- C. Use a single AWS Elastic Beanstalk environment and an AWS OpsWorks environment to deploy staging and production environments. Update the Elastic Beanstalk environment—deployed via the OpsWorks stack—by uploading a ZIP file containing the new application code. Validate traffic in the new environment, and immediately terminate the old environment upon successful testing.
- D. Deploy an additional staging environment using AWS CloudFormation and configure Route 53 DNS with weighted records. During cutover, gradually increase weight allocation to direct more traffic to the new staging environment as workload validation succeeds. Retain the old production environment until the new staging environment handles all traffic. ✓
Correct Answer: D. Deploy an additional staging environment using AWS CloudFormation and configure Route 53 DNS with weighted records. During cutover, gradually increase weight allocation to direct more traffic to the new staging environment as workload validation succeeds. Retain the old production environment until the new staging environment handles all traffic.
Explanation
In this scenario, the DevOps engineer must implement a rollback-capable deployment workflow to minimize impact from failed software releases. Deploying an additional staging environment using AWS CloudFormation and controlling traffic distribution via Route 53 weighted routing is ideal. This approach enables incremental traffic shifting and pre-cutover validation in the new environment. If issues arise, traffic can be instantly reverted to the stable environment, enabling seamless rollback. Option D supports gradual, validated traffic migration while preserving the legacy environment until full cutover—fulfilling safety, observability, and rollback requirements.