DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 Exam - Question 26


A developer is creating an application that will be deployed on IoT devices. The application will send data to a RESTful API that is deployed as an AWS Lambda function. The application will assign each API request a unique identifier. The volume of API requests from the application can randomly increase at any given time of day.

During periods of request throttling, the application might need to retry requests. The API must be able to handle duplicate requests without inconsistencies or data loss.

Which solution will meet these requirements?

Show Answer
Correct Answer: B

To handle duplicate API requests without inconsistencies or data loss, creating an Amazon DynamoDB table to store the unique identifier for each request is the best solution. DynamoDB offers strong consistency and provides the necessary mechanisms to check for duplicates before processing. This helps ensure the data remains consistent even if the application retries requests due to throttling. Additionally, DynamoDB is well-suited for the unstructured data typically generated by IoT devices, and its scalability can handle the variable volume of API requests effectively.

Discussion

6 comments
Sign in to comment
Devon_FazekasOption: B
May 9, 2023

I originally thought ElastiCache would provide the sufficient session management of the unique identifiers with the least latency. But apparently, the scope of this question revolves around durability, not latency. Hence, a persistent storage is better suited. And while RDS is a viable solution for durability and performance, the question specifies IoT devices which typically produce unstructured data that is better handled by No-SQL services like DynamoDB.

UntamablesOption: B
Mar 23, 2023

B The resolution is to make the Lambda function idempotent. https://repost.aws/knowledge-center/lambda-function-idempotent https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/

Tony88Option: B
Sep 3, 2023

Cache topic. So Elastic Redis and DynamoDB both can be used as a cache solution. If you want high performance, low latency, go with Redis If you want persistent storage, go with DyanmoDB.

ElFaramawi
Jun 4, 2024

Why not C? According to the question "During periods of request throttling, the application might need to retry requests", this indicate that lambda should returns client error, so the application can make another retry request to fix the problem

cocolavayen
Jul 4, 2024

same doubt

queekao
Jul 20, 2024

because c don't mention about retry actions

Abdullah22Option: B
Mar 11, 2024

Consistency: Memcached does not provide built-in support for atomic operations or conditional writes like DynamoDB does. Handling duplicate requests and ensuring consistency would require additional application logic and complexity.

65703c1Option: B
May 21, 2024

B is the correct answer.