exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 168 discussion

A DevOps engineer is building a solution that uses Amazon Simple Queue Service (Amazon SQS) standard queues. The solution also includes an AWS Lambda function and an Amazon DynamoDB table. The Lambda function pulls content from an SQS queue event source and writes the content to the DynamoDB table.

The solution must maximize the scalability of Lambda and must prevent successfully processed SQS messages from being processed multiple times.

Which solution will meet these requirements?

  • A. Decrease the batch window to 1 second when configuring the Lambda function's event source mapping.
  • B. Decrease the batch size to 1 when configuring the Lambda function's event source mapping.
  • C. Include the ReportBatchItemFailures value in the FunctionResponseTypes list in the Lambda function's event source mapping.
  • D. Set the queue visibility timeout on the Lambda function's event source mapping to account for invocation throttling of the Lambda function.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
csG13
Highly Voted 1 year, 4 months ago
Selected Answer: C
It's C, here is a reference: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
upvoted 5 times
noisonnoiton
9 months, 3 weeks ago
link updated: https://docs.aws.amazon.com/lambda/latest/dg/services-sqs-errorhandling.html
upvoted 1 times
...
...
youonebe
Most Recent 4 months, 2 weeks ago
Selected Answer: D
C does not prevent multiple message processing
upvoted 1 times
...
youonebe
4 months, 2 weeks ago
Selected Answer: D
The visibility timeout determines how long SQS will "hide" a message after Lambda begins processing it. The key here is ensuring that the message is not available for another Lambda function invocation until the current one completes successfully. The visibility timeout should be at least as long as the Lambda function's maximum processing time, ensuring that the same message is not processed again while it is being handled.
upvoted 1 times
...
flaacko
8 months, 2 weeks ago
To prevent Lambda from processing a message multiple times, you can either configure your event source mapping to include batch item failures in your function response, or you can use the DeleteMessage API to remove messages from the queue as your Lambda function successfully processes them. To avoid reprocessing successfully processed messages in a failed batch, you can configure your event source mapping to make only the failed messages visible again. This is called a partial batch response. To turn on partial batch responses, specify ReportBatchItemFailures for the FunctionResponseTypes action when configuring your event source mapping. This lets your function return a partial success, which can help reduce the number of unnecessary retries on records. Source: https://docs.aws.amazon.com/lambda/latest/dg/services-sqs-errorhandling.html#services-sqs-batchfailurereporting
upvoted 2 times
...
Gomer
10 months, 1 week ago
Selected Answer: C
"Implementing partial batch responses When "Lambda function encounters an error while processing a batch, all messages"... "become visible in the queue"... "including messages that Lambda processed successfully." "...your function can end up processing the same message several times. "To avoid reprocessing successfully processed messages in a failed batch" "configure your event source mapping to make only the failed messages visible again." "To turn on partial batch responses, specify ReportBatchItemFailures for the FunctionResponseTypes action when configuring your event source mapping." "This lets your function return a partial success, which can help reduce the number of unnecessary retries on records." https://docs.aws.amazon.com/lambda/latest/dg/services-sqs-errorhandling.html
upvoted 1 times
Gomer
10 months, 1 week ago
The URL with "services-sqs-batchfailurereporting" pointer seems to be invalid now. I think the preceeding URL replaced it.
upvoted 1 times
...
...
misako
11 months, 3 weeks ago
Selected Answer: B
C doesn't address the "maximize the scalability of Lambda" while B addresses both, while batch size is 1, you either fail or success
upvoted 1 times
...
c3518fc
1 year ago
Selected Answer: C
To avoid reprocessing successfully processed messages in a failed batch, you can configure your event source mapping to make only the failed messages visible again. This is called a partial batch response. To turn on partial batch responses, specify ReportBatchItemFailures for the FunctionResponseTypes action when configuring your event source mapping. This lets your function return a partial success, which can help reduce the number of unnecessary retries on records. https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
upvoted 4 times
...
dkp
1 year ago
Selected Answer: C
answer C
upvoted 2 times
...
DanShone
1 year, 1 month ago
Selected Answer: C
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
upvoted 2 times
...
thanhnv142
1 year, 2 months ago
Selected Answer: C
C is correct. We need ReportBatchItemFailures to return only failed items A: batch window is the interval process time B: batch size is the size of the job D: queue visibility timeout is about re-process
upvoted 4 times
...
ozansenturk
1 year, 4 months ago
Selected Answer: C
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
upvoted 2 times
...
d262e67
1 year, 4 months ago
Selected Answer: C
Lambda process messages in batches. If one message in the batch fails the whole batch considered failed and all messages in the batch return to the queue. For example if batch has 10 messages and message 5 and 7 failed to get processed, all 10 messages will return to the queue. So, successfully processed messages can get processed again. Now to prevent this to happen you have two ways (used to be one) 1. Write your code in a way to identify processed messages and delete them manually from SQS. 2. Partial batch response that returns only the messages that were failed to be processed (supported since Dec 2021). References: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
upvoted 4 times
...
hisdlodskfe
1 year, 4 months ago
C is correct.
upvoted 1 times
...
PrasannaBalaji
1 year, 4 months ago
Selected Answer: B
B is correct
upvoted 1 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