exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 26 discussion

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?

  • A. Create an Amazon RDS for MySQL DB instance. Store the unique identifier for each request in a database table. Modify the Lambda function to check the table for the identifier before processing the request.
  • B. Create an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to check the table for the identifier before processing the request.
  • C. Create an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to return a client error response when the function receives a duplicate request.
  • D. Create an Amazon ElastiCache for Memcached instance. Store the unique identifier for each request in the cache. Modify the Lambda function to check the cache for the identifier before processing the request.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Devon_Fazekas
Highly Voted 1 year, 8 months ago
Selected Answer: B
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.
upvoted 29 times
...
Untamables
Highly Voted 1 year, 9 months ago
Selected Answer: B
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/
upvoted 9 times
...
sumanshu
Most Recent 2 weeks, 1 day ago
Selected Answer: B
A) Eliminated - RDS is not as scalable as DynamoDB for handling unpredictable spikes in traffic. D) Eliminated - Memcached is an in-memory cache that is not designed for persistence or durability. If the instance is restarted or the data is evicted due to memory constraints, the identifiers could be lost
upvoted 2 times
sumanshu
2 weeks, 1 day ago
C) Eliminated - Returning a client error response for duplicate requests is not a good approach
upvoted 2 times
...
...
trieudo
3 weeks, 1 day ago
Selected Answer: B
keyword: - AWS Lambda function - increase at any given time - retry requests - handle duplicate requests ==> Discard A, D: violate 'increase at any given time', it is not automatically, because it is not fit with serverless service 'AWS Lambda function' ==> Discard C: violate 'retry requests + handle duplicate requests', => different response from success vs. error error, make it is non-idempotency => Discard D: violate 'inconsistencies or data loss.' it doest not store persistent data. B is best solution
upvoted 2 times
...
f271c23
1 month ago
Selected Answer: C
I think C has the merits to be a right answer. It has more specific handling to duplicate requests . The answer B does the same but the langugage is more explicite in option C
upvoted 1 times
...
ElFaramawi
7 months ago
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
upvoted 3 times
queekao
5 months, 2 weeks ago
because c don't mention about retry actions
upvoted 1 times
...
cocolavayen
6 months ago
same doubt
upvoted 1 times
...
...
65703c1
7 months, 2 weeks ago
Selected Answer: B
B is the correct answer.
upvoted 1 times
...
Abdullah22
10 months ago
Selected Answer: B
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.
upvoted 1 times
...
Tony88
1 year, 4 months ago
Selected Answer: B
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.
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago