An AWS Lambda function polls messages from an Amazon SQS standard queue and makes an HTTP request to an external API for each message. The company wants to ensure the Lambda function never issues more than two concurrent requests to that third-party API. Which configuration satisfies this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the maximum concurrency to two on the Lambda event source mapping for the SQS queue..
Why this is the answer
Setting the maximum concurrency to two on the Lambda event source mapping for the SQS queue directly limits the number of concurrent Lambda invocations processing messages from that specific SQS queue to two. This ensures that the Lambda function will never make more than two concurrent HTTP requests to the external API, as each invocation processes messages and makes a request. Provisioned concurrency guarantees a minimum number of concurrent invocations but doesn't cap the maximum. An SQS batch size of two means each invocation processes two messages, but it doesn't limit the number of concurrent invocations themselves. Lambda event filtering selects which messages to process but doesn't control concurrency.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed