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 268 discussion

A developer is creating an AWS Lambda function that consumes messages from an Amazon Simple Queue Service (Amazon SQS) standard queue. The developer notices that the Lambda function processes some messages multiple times.

How should developer resolve this issue MOST cost-effectively?

  • A. Change the Amazon SQS standard queue to an Amazon SQS FIFO queue by using the Amazon SQS message deduplication ID.
  • B. Set up a dead-letter queue.
  • C. Set the maximum concurrency limit of the AWS Lambda function to 1.
  • D. Change the message processing to use Amazon Kinesis Data Streams instead of Amazon SQS.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
BrainFried
8 months, 3 weeks ago
Selected Answer: C
The problem is the Lambda processes the message multiple times. This is due to Lambda concurrency mixed with VisibilityTimeout of the SQS queue. VisibilityTimeout defaults to 30 seconds. Using this default, if the Lambda takes longer than 30 seconds to process the message, then the message will become available again in the Queue for consumers. This means a second Lambda can come along and dequeue the same message - leading to duplicate processing. This problem can be solved with A or C However - the question is asking for MOST cost effective The answer MUST be C then: using Lambda Reserved Concurrency (totally free).
upvoted 3 times
...
65703c1
11 months, 2 weeks ago
Selected Answer: A
A is the correct answer.
upvoted 3 times
...
KarBiswa
1 year, 1 month ago
The actual answers are not mentioned into the options as most cost effective remedy https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting:~:text=To%20prevent%20Lambda,successfully%20processes%20them.
upvoted 1 times
...
Tchie
1 year, 1 month ago
B is correct Because of Cost
upvoted 1 times
...
SerialiDr
1 year, 1 month ago
Selected Answer: A
Given this, based on AWS best practices, changing the Amazon SQS standard queue to an Amazon SQS FIFO (First-In, First-Out) queue using the Amazon SQS message deduplication ID (Option A) is the most effective way to ensure messages are processed once and in the order they are sent. FIFO queues are designed to prevent duplicate processing and maintain the order of messages, which aligns with the requirement to resolve the issue of Lambda functions processing some messages multiple times.
upvoted 4 times
...
KarBiswa
1 year, 2 months ago
Selected Answer: C
In this case most cost effective option
upvoted 1 times
KarBiswa
1 year, 2 months ago
Changing it to A after consulting https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#:~:text=To%20prevent%20Lambda,successfully%20processes%20them.
upvoted 1 times
KarBiswa
1 year, 1 month ago
Ideally none of the options are correct based on the documentaion
upvoted 1 times
...
...
...
CrescentShared
1 year, 2 months ago
Selected Answer: A
A is correct.
upvoted 4 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