Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon Exam DOP-C02 Topic 2 Question 32 Discussion

Actual exam question for Amazon's DOP-C02 exam
Question #: 32
Topic #: 2
[All DOP-C02 Questions]

A company releases a new application in a new AWS account. The application includes an AWS Lambda function that processes messages from an Amazon Simple Queue Service (Amazon SOS) standard queue. The Lambda function stores the results in an Amazon S3 bucket for further downstream processing. The Lambda function needs to process the messages within a specific period of time after the messages are published. The Lambda function has a batch size of 10 messages and takes a few seconds to process a batch of messages.

As load increases on the application's first day of service, messages in the queue accumulate at a greater rate than the Lambda function can process the messages. Some messages miss the required processing timelines. The logs show that many messages in the queue have data that is not valid. The company needs to meet the timeline requirements for messages that have valid data.

Which solution will meet these requirements?

Show Suggested Answer Hide Answer
Suggested Answer: D

Step 2: Using an SQS Dead-Letter Queue (DLQ) Configuring a dead-letter queue (DLQ) for SQS will ensure that messages with invalid data, or those that cannot be processed successfully, are moved to the DLQ. This prevents such messages from clogging the queue and allows the system to focus on processing valid messages.

Action: Configure an SQS dead-letter queue for the main queue.

Why: A DLQ helps isolate problematic messages, preventing them from continuously reappearing in the queue and causing processing delays for valid messages.

Step 3: Maintaining the Lambda Function's Batch Size Keeping the current batch size allows the Lambda function to continue processing multiple messages at once. By addressing the failed items separately, there's no need to increase or reduce the batch size.

Action: Maintain the Lambda function's current batch size.

Why: Changing the batch size is unnecessary if the invalid messages are properly handled by reporting failed items and using a DLQ.

This corresponds to Option D: Keep the Lambda function's batch size the same. Configure the Lambda function to report failed batch items. Configure an SQS dead-letter queue.

Contribute your Thoughts:

Jaime
3 months ago
Yes, that sounds like a comprehensive solution to meet the requirements.
upvoted 0 times
...
Lucia
3 months ago
We should also request a Lambda concurrency increase in the AWS Region for better performance.
upvoted 0 times
...
Stanford
3 months ago
Yo, this is a no-brainer! Option D is the way to go. Shoutout to the Lambda team for that failed batch item feature. It's like having a cheat code for your code!
upvoted 0 times
...
Herminia
3 months ago
Hmm, I'm not sure about the other options. Increasing the batch size or changing the queue type might not solve the issue of invalid data. D looks like the most logical choice here.
upvoted 0 times
Margret
3 months ago
I agree. Reporting failed batch items will help ensure valid messages are processed on time.
upvoted 0 times
...
Janessa
3 months ago
I think D is the best option. It addresses the issue of invalid data.
upvoted 0 times
...
...
Deja
3 months ago
I agree with Lorrine. The dead-letter queue is a great way to handle the invalid messages and ensure the valid ones are processed in time.
upvoted 0 times
...
Lorrine
4 months ago
This seems like a straightforward problem. Option D seems to be the best solution as it allows the Lambda function to skip invalid messages and process the valid ones within the required timeline.
upvoted 0 times
Shoshana
3 months ago
Yes, keeping the batch size the same and configuring the Lambda function to report failed batch items is the way to go.
upvoted 0 times
...
Stevie
3 months ago
I agree, reporting failed batch items will definitely help in meeting the processing timeline for valid messages.
upvoted 0 times
...
Jesusita
3 months ago
Option D seems like the best choice. It allows the Lambda function to skip invalid messages and process the valid ones within the required timeline.
upvoted 0 times
...
...
Ira
4 months ago
I agree, and we should also change the SOS standard queue to an SOS FIFO queue.
upvoted 0 times
...
Josefa
4 months ago
I think we should increase the Lambda function's batch size.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77