Question

Difficulty: HardEnhancing Reliability and Disaster Recovery

An enterprise runs a critical e-commerce platform in an active-passive disaster recovery configuration across two AWS Regions: us-east-1 (Primary) and us-west-2 (Secondary). The architecture includes an Application Load Balancer (ALB) and an Auto Scaling group of Amazon EC2 instances in each region. The database layer uses an Amazon Aurora PostgreSQL Global Database, with the primary cluster in us-east-1 and a read replica cluster in us-west-2. Amazon Route 53 public hosted zones are configured with failover routing records pointing to the primary and secondary ALBs. During a simulated database outage in us-east-1, the database became completely unresponsive, but the EC2 instances and ALB remained healthy, preventing Route 53 from failing over and causing client requests to fail. Which combination of actions should the Solutions Architect implement to automate failover to the secondary region while meeting an RTO of 15 minutes and an RPO of 5 minutes?

  1. Modify the web application's health check endpoint to execute a query verifying database read and write capability. Set the Application Load Balancer (ALB) target group in the primary region to use this endpoint. In Amazon Route 53, configure the primary failover alias record with 'Evaluate Target Health' set to true. Create an Amazon CloudWatch alarm on the Route 53 health check status that triggers an AWS Lambda function to promote the secondary Aurora database cluster in the secondary region when the primary region is unhealthy.Answer
  2. B
    Configure Amazon Route 53 health checks to monitor the primary database's private endpoint directly on TCP port 5432 using Route 53 resolver endpoints. When the health check fails, configure Route 53 failover to redirect traffic to the secondary ALB. Deploy a NAT Gateway in the database subnets to allow the Route 53 health checkers to access the private database cluster.
  3. C
    Create a Route 53 Private Hosted Zone (PHZ) and associate it with the VPCs in both regions. Configure a custom CloudWatch metric that measures the replication lag of the Aurora Global Database. When the replication lag exceeds 5 minutes, configure a CloudWatch alarm to trigger a Lambda function that updates the Route 53 records in the PHZ to point to the secondary region ALB, and promotes the secondary database.
  4. D
    Deploy Amazon Route 53 Application Recovery Controller (ARC) routing controls to manage traffic failover. Configure an Amazon EventBridge rule that detects CloudWatch database CPU utilization alerts on the primary cluster and automatically toggles the routing control to route traffic to the secondary ALB. Rely on Aurora Global Database write forwarding to handle database writes in the secondary region.

Answer

Modify the web application's health check endpoint to validate database connectivity, enable 'Evaluate Target Health' on the primary Route 53 record, and use a CloudWatch alarm with an AWS Lambda function to promote the secondary Aurora cluster.
The correct solution updates the application health check endpoint to check database connectivity. This allows the ALB to determine if the backend database is down and report the targets as unhealthy. By setting 'Evaluate Target Health' to true on the primary Route 53 failover record, Route 53 automatically stops routing traffic to the primary ALB when all targets are unhealthy, and fails over to the secondary ALB. Concurrently, a CloudWatch alarm triggers an AWS Lambda function to promote the secondary Aurora cluster to primary, allowing the secondary region to accept writes and satisfy the RTO and RPO requirements.

Step-by-Step Solution

1
Implement a database connectivity query within the application's health check endpoint (e.g., `/health`).
The ALB target group health check will fail if the EC2 instances cannot connect to or write to the Aurora database.
This links the health of the database layer to the health of the application layer from the ALB's perspective.
2
Enable 'Evaluate Target Health' on the primary Route 53 failover alias record pointing to the primary ALB.
Route 53 will mark the primary alias record as unhealthy when all EC2 instances fail the health check due to the database outage.
This automates public DNS failover to the secondary region's ALB without manual intervention.
3
Create a CloudWatch alarm on the Route 53 health check or ALB target group health to trigger an AWS Lambda function.
The Lambda function executes and calls `rds.promote_read_replica_db_cluster` on the secondary Aurora cluster in us-west-2.
Promoting the secondary cluster is required to turn it into a standalone primary cluster capable of accepting write traffic, meeting the recovery objectives.

Key Concept

End-to-end health checking and automated database promotion are required to ensure successful multi-region disaster recovery failover.
Estimated Time:2m 30s
Rate this question