Serving a global barcode-validation API with lowest latency using DynamoDB global tables and Lambda@Edge
Short answer
D Use DynamoDB global tables with CloudFront and a Lambda@Edge function for the validation and write-back logic, fronted by Route 53 for lowest global latency.
Question
Key Takeaways
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.
Common mistake: Picking CloudFront Functions (Option C) — they can only manipulate viewer requests/responses and cannot run the backend database write logic required here.
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
- https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html
These links open the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 9 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 9
-
HunkyBunky 👍 6 Answered DD is the proper answer CloudFront Functions - can be used only for manipulation with requests data CloudFront Lambda@Edge functions - can be used for anything, because this is a regular lambda function
-
red_panda 👍 5 Answered DD withoud any doubt. For this simple data, a DynamoDB Table is enought; so global table is perfect. For check logic, cloudfront function is not enought because it is only for manipulate HTTP header or something very very light (code, metadata etc.). So for calling some backend layer (querying DynamoDB in this case) we need a Lambda@Edge function, which is much complete.
-
kejam 👍 5 Answered Dhttps://aws.amazon.com/blogs/networking-and-content-delivery/leveraging-external-data-in-lambdaedge/ https://aws.amazon.com/blogs/networking-and-content-delivery/lambdaedge-design-best-practices/
-
AzureDP900 👍 1Option D is correct DynamoDB global tables: By hosting your database in multiple Regions, you can reduce latency for users located in different parts of the world. CloudFront: You can use CloudFront as a CDN to cache static assets and route dynamic requests to the nearest origin. In this case, it will direct users to the Lambda@Edge function closest to them. Lambda@Edge functions: These allow you to execute code at the edge of the network, which reduces latency and improves performance. Using Lambda@Edge functions in conjunction with DynamoDB global tables provides a great combination for reducing latency and improving performance.
-
LeoSantos121212121212121 👍 1 Answered AAurora Global Database provides low-latency read access from multiple Regions and allows writes in a primary Region. Since the system only marks the ticket as used once, it's safe to centralize writes. ECS clusters deployed regionally offer scalable, containerized API backends. AWS Global Accelerator routes users to the closest backend ECS cluster using the AWS edge network, minimizing latency and maximizing performance. Route 53 maps the DNS (api.example.com) to the Global Accelerator endpoint.
Show 4 more comments
-
alexis123456 👍 6Correct Answer is A
-
TheCloudGuruu 👍 4 Answered DD. Lambda@Edge
-
9f02c8d 👍 1Option: D
-
career360guru 👍 1 Answered DOption D
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →