A global ticketing mobile app displays a barcode that event scanners read. After scanning, scanner devices call a backend API to validate the barcode against a database and then update a single database table to mark the barcode as used. The company will host the database in three AWS Regions and needs a DNS name api.example.com. Which architecture provides the LOWEST latency for barcode validation and the update operation?
Choose an answer
Tap an option to check your answer.
Correct answer: Host the database using Amazon DynamoDB global tables. Create an Amazon CloudFront distribution and associate a Lambda@Edge function that implements the backend logic to validate barcodes at edge locations. Create an Amazon Route 53 record that maps api.example.com to the CloudFront distribution..
Why this is the answer
The correct answer leverages DynamoDB global tables, which provide fast, fully managed, multi-Region replication for the barcode data, ensuring low-latency reads and writes globally. Lambda@Edge functions execute code at CloudFront edge locations, close to users, minimizing network latency for both the API call and the database interaction. CloudFront acts as the entry point, routing requests to the nearest edge location. This combination provides the lowest possible latency for both validation and update operations. Using Aurora Global Database with ECS or EKS (first two options) introduces higher latency because Aurora Global Database is designed for disaster recovery and fast reads from secondary regions, but writes still originate from the primary region, which would add latency for updates across regions. CloudFront with EKS origins (second option) can route to the nearest EKS cluster, but the database interaction still faces the Aurora global database write latency issue. CloudFront Functions (third option) have limitations on what they can do, and Lambda@Edge is more suitable for complex backend logic involving database calls.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed