
Answer-first summary for fast verification
Answer: Persist the unique identifier for each request in a DynamoDB table. Change the Lambda function to check the table for the identifier before processing the request
DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-Region replication, in-memory caching, and data import and export tools. On-demand backup and restore allows you to create full backups of your DynamoDB. Point-in-time recovery (PITR) helps protect your DynamoDB tables from accidental write or delete operations. PITR provides continuous backups of your DynamoDB table data, and you can restore that table to any point in time up to the second during the preceding 35 days. These features ensure that there is no data loss for the application, thereby meeting a key requirement for the given use case. The solution should also be able to address any duplicate requests without inconsistencies, so the Lambda function should be changed to inspect the table for the given identifier and process the request only if the identifier is unique.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company is developing a gaming application intended for mobile devices, which will interact with a Lambda function-based RESTful API. This application assigns a unique identifier to each API request. Given that the volume of API requests can fluctuate unpredictably at any time, there may be instances of request throttling, necessitating the application to retry certain requests. The API must efficiently manage duplicate requests to ensure consistency and prevent data loss.
Which of the following solutions would you recommend to meet these requirements?
A
Persist the unique identifier for each request in a DynamoDB table. Change the Lambda function to send a client error response when the function receives a duplicate request
B
Persist the unique identifier for each request in an ElastiCache for Memcached cache. Change the Lambda function to check the cache for the identifier before processing the request
C
Persist the unique identifier for each request in an RDS MySQL table. Change the Lambda function to check the table for the identifier before processing the request
D
Persist the unique identifier for each request in a DynamoDB table. Change the Lambda function to check the table for the identifier before processing the request