How should a solutions architect accomplish this?
Replace the existing architecture with a website served from an Amazon S3 bucket. Configure an Amazon CloudFront distribution with the S3 bucket as the origin.
Configure an Amazon CloudFront distribution with the ALB as the origin. Set the cache behavior settings to only cache based on the Accept-Language request header.
Set up Amazon API Gateway with the ALB as an integration. Configure API Gateway to use an HTTP integration type. Set up an API Gateway stage to enable the API cache.
Launch an EC2 instance in each additional Region and configure NGINX to act as a cache server for that Region. Put all the instances plus the ALB behind an Amazon Route 53 record set with a geolocation routing policy.
Explanations:
While serving a website from an S3 bucket with CloudFront can improve latency, this approach does not accommodate the existing architecture with EC2 instances behind an ALB and may not fully support dynamic content or functionality currently offered by the application.
Configuring a CloudFront distribution with the ALB as the origin allows for improved latency by caching responses and distributing content closer to users globally. This maintains the existing architecture while enhancing performance by reducing request latency without requiring multiple Regions.
Using Amazon API Gateway with the ALB as an integration may not directly improve latency for a multilingual website as intended. API Gateway is better suited for RESTful APIs and may introduce additional overhead rather than optimizing latency for a traditional web application served from EC2 instances.
Launching EC2 instances in multiple Regions and configuring NGINX as a cache server increases complexity and cost without the benefits of a global caching strategy. It also requires significant management overhead and does not utilize AWS’s global infrastructure effectively compared to using CloudFront.