exam questions

Exam AWS Certified Developer Associate All Questions

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

Exam AWS Certified Developer Associate topic 1 question 19 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 19
Topic #: 1
[All AWS Certified Developer Associate Questions]

A company hosts a microservices application that uses Amazon API Gateway. AWS Lambda, Amazon Simple Queue Service (Amazon SQS), and Amazon
DynamoDB. One of the Lambda functions adds messages to an SQS FIFO queue.
When a developer checks the application logs, the developer finds a few duplicated items in a DynamoDB table. The items were inserted by another polling function that processes messages from the queue.
What is the MOST likely cause of this issue?

  • A. Write operations on the DynamoDB table are being throttled.
  • B. The SQS queue delivered the message to the function more than once.
  • C. API Gateway duplicated the message in the SQS queue.
  • D. The polling function timeout is greater than the queue visibility timeout.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
sidvic
Highly Voted 2 years, 5 months ago
Selected Answer: D
The only plausible solution
upvoted 10 times
...
sumanshu
Most Recent 2 weeks, 5 days ago
Selected Answer: D
A) Eliminated - Throttling would typically result in missing or delayed entries, not duplicates. B) Eliminated - SQS FIFO queues are designed to ensure exactly-once processing, C) Eliminated - API Gateway does not directly interact with SQS queues unless explicitly configured to do so. Even if API Gateway sends duplicate requests, the FIFO queue guarantees exactly-once delivery into the queue. Duplicates can only occur during processing, not from API Gateway itself. D) Correct - If the polling function's processing time (timeout) exceeds the visibility timeout, the message becomes visible again in the queue and can be reprocessed.
upvoted 1 times
...
JonasKahnwald
2 months, 3 weeks ago
Selected Answer: D
If the polling function’s execution time exceeds the visibility timeout, the message can be reprocessed, causing duplicate entries in the DynamoDB table.
upvoted 1 times
...
thucta96dn
3 months, 1 week ago
Selected Answer: D
If the time to process message is more than time visibility time out in the queue. The message will be touch twice
upvoted 1 times
...
thucta96dn
3 months, 1 week ago
Selected Answer: C
a message into FIFO can not be read by more than one process. The answer should be C
upvoted 1 times
...
SD_CS
1 year ago
Selected Answer: D
D - this is the only one that makes sense
upvoted 1 times
...
gilleep_17
1 year ago
OPTION D
upvoted 1 times
...
AsmaZoheb
1 year ago
Selected Answer: D
for sure D
upvoted 1 times
...
hulongdou
1 year, 3 months ago
Does anyone raised a question like me, which is DynamoDB does not allow to have two identical items. So , this question itself is wrong?
upvoted 2 times
...
rcaliandro
1 year, 7 months ago
Selected Answer: D
I totally agree, the visibility timeout is an important parameter, if too short, a message can be processed twice or more....
upvoted 1 times
...
Cock
1 year, 10 months ago
Selected Answer: D
This can happen because the message remains in the queue for a longer time, and it can be delivered to the same or another instance of the polling function again, which can result in duplicate items in the DynamoDB table. To resolve this issue, the developer can adjust the timeout settings and ensure that the queue visibility timeout is lower than the polling function's timeout. This will ensure that the message remains invisible to the queue for the desired time and is not delivered again during that period.
upvoted 4 times
...
pancman
1 year, 11 months ago
Selected Answer: D
D is the answer
upvoted 1 times
...
may2021_r
1 year, 11 months ago
In a SQS FIFO queue, each message is processed exactly once and in the exact order it was added to the queue. However, in rare cases, a message might be delivered more than once, even when using a FIFO queue. This can happen if there is a delay in acknowledging the message or if the message times out before it can be deleted. In such cases, the message is returned to the queue and can be processed again by a consumer, resulting in duplicate processing of the same message. Option B I think
upvoted 3 times
JonasKahnwald
1 month, 4 weeks ago
The part you're quoting is talking about "rare cases". Keyword in the question is MOST likely. While B isn't impossible, D is far more likely.
upvoted 1 times
...
...
Krt5894
1 year, 12 months ago
Selected Answer: D
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html
upvoted 3 times
...
dark_cherrymon
2 years, 2 months ago
Selected Answer: D
" If you don’t set the visibility timeout correctly, your message may be re-processed" https://tomgregory.com/3-surprising-facts-about-aws-sqs-fifo-queues/
upvoted 2 times
...
andregri
2 years, 4 months ago
Selected Answer: D
If the function does not delete the message from SQS before the Visibility Timeout expires, another function will process the same message twice.
upvoted 2 times
...
CollinsWolf
2 years, 4 months ago
D It is very important to set the visibility timeout to a longer time because if the request does not get processed faster than the timeout, then it becomes visible again in the queue and its picked up by another service and reprocessed. This will result in duplicate processes.
upvoted 3 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