Which solution will meet these requirements with the LOWEST latency?
Host the database on Amazon Aurora global database clusters. Host the backend on three Amazon Elastic Container Service (Amazon ECS) clusters that are in the same Regions as the database. Create an accelerator in AWS Global Accelerator to route requests to the nearest ECS cluster. Create an Amazon Route 53 record that maps api.example.com to the accelerator endpoint
Host the database on Amazon Aurora global database clusters. Host the backend on three Amazon Elastic Kubernetes Service (Amazon EKS) clusters that are in the same Regions as the database. Create an Amazon CloudFront distribution with the three clusters as origins. Route requests to the nearest EKS cluster. Create an Amazon Route 53 record that maps api.example.com to the CloudFront distribution.
Host the database on Amazon DynamoDB global tables. Create an Amazon CloudFront distribution. Associate the CloudFront distribution with a CloudFront function that contains the backend logic to validate the barcodes. Create an Amazon Route 53 record that maps api.example.com to the CloudFront distribution.
Host the database on Amazon DynamoDB global tables. Create an Amazon CloudFront distribution. Associate the CloudFront distribution with a Lambda@Edge function that contains the backend logic to validate the barcodes. Create an Amazon Route 53 record that maps api.example.com to the CloudFront distribution.
Explanations:
While using Amazon Aurora global database clusters and ECS clusters in the same regions as the databases is effective, Global Accelerator is primarily for TCP/UDP traffic. It does not provide low-latency HTTP/HTTPS request routing to backend services, as CloudFront does.
Although this option utilizes Aurora global database clusters and EKS clusters, using CloudFront for routing to EKS is not optimal for low-latency API responses. CloudFront is designed for content delivery and caching rather than direct backend API service routing.
Hosting the database on DynamoDB global tables is beneficial for low-latency access, but associating a CloudFront distribution with a CloudFront function does not support server-side logic like barcode validation effectively. CloudFront functions are limited in capability and not designed for complex backend operations.
This option leverages DynamoDB global tables for low-latency access and uses a CloudFront distribution paired with a Lambda@Edge function. This setup allows for processing requests closer to the user and provides the capability to handle backend logic, such as barcode validation, efficiently, leading to the lowest latency overall.