
Answer-first summary for fast verification
Answer: Set a batch size of two in the Lambda function's Amazon SQS event source mapping.
The correct answer is B: 'Set a batch size of two in the Lambda function's Amazon SQS event source mapping.' Setting the batch size to two ensures that the Lambda function processes only two messages at a time, thereby limiting the function to making at most two concurrent HTTP requests to the third-party API. This directly controls the concurrency of how many messages are processed simultaneously, which directly addresses the requirement not to overwhelm the third-party API with more than two concurrent requests.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can a company ensure that an AWS Lambda function processing messages from an Amazon SQS standard queue does not exceed two concurrent HTTP requests to a third-party API?
A
Set provisioned concurrency to two for the Lambda function.
B
Set a batch size of two in the Lambda function's Amazon SQS event source mapping.
C
Implement Lambda event filtering to handle two messages per invocation.
D
Limit the maximum concurrency to two in the Amazon SQS event source mapping for the Lambda function.