
Answer-first summary for fast verification
Answer: Use Amazon DynamoDB, storing identifiers and verifying them in Lambda to prevent duplicate processing.
The correct answer is B. Utilizing Amazon DynamoDB to store unique identifiers and checking them in the AWS Lambda function before processing ensures idempotency and handles variable request volumes effectively. DynamoDB is better suited than RDS in this context because IoT devices typically produce unstructured data. Moreover, DynamoDB is a NoSQL service that provides persistent storage, which is crucial for ensuring data consistency and handling retries without losing data. This approach ensures that duplicate requests are managed correctly without the risk of inconsistencies or data loss.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
An IoT application sends data to a RESTful API via AWS Lambda. It must handle variable request volumes and potential retries without data inconsistencies. Which service and approach best ensures idempotency for API requests?
A
Utilize Amazon RDS for MySQL, storing request identifiers in a table and checking them in Lambda before processing.
B
Use Amazon DynamoDB, storing identifiers and verifying them in Lambda to prevent duplicate processing.
C
Implement Amazon DynamoDB, but return client errors for duplicate requests without additional checks in Lambda.
D
Leverage Amazon ElastiCache for Memcached to cache identifiers, with Lambda checking the cache before processing.