Serving a global barcode-validation API with lowest latency using DynamoDB global tables and Lambda@Edge
A global company has a mobile app that displays ticket barcodes. Customers use the tickets on the mobile app to attend live events. Event scanners read the ticket barcodes and call a backend API to validate the barcode data against data in a database. After the barcode is scanned, the backend logic writes to the database's single table to mark the barcode as used. The company needs to deploy the app on AWS with a DNS name of api.example.com. The company will host the database in three AWS Regions around the world. Which solution will meet these requirements with the LOWEST latency?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Lambda@Edge (not CloudFront Functions) can execute arbitrary backend logic including writing to DynamoDB global tables; combined with CloudFront and Route 53 it delivers the lowest-latency global experience.
A global barcode app needs multi-region low latency and DNS api.example.com. DynamoDB global tables provide multi-Region data access, CloudFront fronts the API, and a Lambda@Edge function runs the validation and write-back logic at the edge — CloudFront Functions cannot perform the database write.
Picking CloudFront Functions (Option C) — they can only manipulate viewer requests/responses and cannot run the backend database write logic required here.
Community Discussion (9 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option D pairs DynamoDB global tables (low-latency multi-Region data) with CloudFront and a Lambda@Edge function that performs the barcode validation and the write to mark the barcode used. Lambda@Edge can run full Lambda logic including DynamoDB writes at the edge, and Route 53 maps api.example.com to the distribution. This yields the lowest global latency.Why the Other Options Are Wrong
Option C uses CloudFront Functions, which are restricted to lightweight request/response manipulation and cannot execute the database write logic. Options A and B use Aurora Global Database, which adds cross-Region replication lag for writes and more operational overhead than DynamoDB global tables for this simple key/value marker.Community Comment Notes
HunkyBunky (likes 6) explains CloudFront Functions only manipulate request data while Lambda@Edge can do anything, including the DB write. alexis123456 argues for A, but Aurora Global adds write latency versus DynamoDB global tables.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →