What should a solutions architect implement to overcome these timeout errors?
Create a Route 53 simple routing policy record for each EC2 instance. Associate a health check with each record.
Create a Route 53 failover routing policy record for each EC2 instance. Associate a health check with each record.
Create an Amazon CloudFront distribution with EC2 instances as its origin. Associate a health check with the EC2 instances.
Create an Application Load Balancer (ALB) with a health check in front of the EC2 instances. Route to the ALB from Route 53.
Explanations:
A simple routing policy does not consider instance health. If an instance is unhealthy, Route 53 can still return its IP address. Health checks are not per record but per instance, and this does not provide automatic failover or routing to healthy instances.
A failover routing policy can help, but it would require a secondary failover record, which is not the case here. Failover routing is more suitable for primary/secondary configurations, not for balancing traffic across multiple healthy instances.
CloudFront helps with caching and content delivery but does not directly manage the health of EC2 instances or provide routing based on instance health. Health checks are not inherently tied to CloudFront distributions in the same way they are with EC2 instances or load balancers.
An Application Load Balancer (ALB) provides built-in health checks and automatically routes traffic only to healthy instances. It can distribute traffic across all healthy EC2 instances, preventing routing to unhealthy ones and reducing the likelihood of timeouts.