An enterprise document management SaaS provider runs an Optical Character Recognition (OCR) processing engine on Amazon EC2 instances in an Auto Scaling group (ASG) behind an Application Load Balancer (ALB) across three Availability Zones (AZ-A, AZ-B, and AZ-C). Outbound traffic to third-party licensing APIs is routed through a single NAT Gateway deployed in AZ-A. During peak hours, sudden spikes in scanned document uploads cause a processing backlog. The ASG scales out based on average CPU utilization exceeding 70%, but new instances require 8 minutes to bootstrap (downloading OCR libraries and loading language models) before they can pass ALB health checks. During this startup window, the ASG continuously launches unnecessary instances, leading to cost inefficiencies. Additionally, a recent outage in AZ-A caused all OCR processing in AZ-B and AZ-C to fail due to blocked outbound license checks. A Solutions Architect must optimize the architecture to prevent redundant instance launches, reduce processing backlogs during spikes, and eliminate the single point of failure for outbound traffic. Which of the following architectural modifications best satisfies these requirements with the lowest operational overhead?
- Create a custom AMI containing the pre-installed OCR libraries and language models, configure an Auto Scaling group warm pool, and set the instance warmup time in the target tracking scaling policy to match the remaining initialization duration. Deploy a NAT Gateway in each of the three Availability Zones, and update the route table of each private subnet to route outbound traffic through its local NAT Gateway.Answer
- BSubmit a request to AWS Support to pre-warm the Application Load Balancer before the peak period starts to prevent connection timeouts. Increase the Auto Scaling group's default cooldown period to 600 seconds to prevent early scaling actions. Deploy a second NAT Gateway in AZ-B, and update a single shared route table used by all private subnets to point to both NAT Gateways to distribute outbound traffic.
- CUpdate the Auto Scaling group scaling policy to step scaling and reduce the default cooldown period to 60 seconds to ensure the group reacts rapidly to the backlog. Deploy a NAT Gateway in each of the three Availability Zones, and configure a public Route 53 DNS resolver to load-balance outbound requests across the NAT Gateways.
- DConfigure a dynamic target tracking scaling policy using a short cooldown, and configure an Application Load Balancer pre-warming schedule via a Lambda function. Keep the single NAT Gateway in AZ-A, but configure a secondary route pointing directly to an internet gateway in the other private subnets' route tables to act as a failover.