AWS Certified Developer – Associate (DVA-C02) — Question 307
A company runs an application on AWS. The application uses an AWS Lambda function that is configured with an Amazon Simple Queue Service (Amazon SQS) queue called high priority queue as the event source. A developer is updating the Lambda function with another SQS queue called low priority queue as the event source. The Lambda function must always read up to 10 simultaneous messages from the high priority queue before processing messages from low priority queue. The Lambda function must be limited to 100 simultaneous invocations.
Which solution will meet these requirements?
Answer options
- A. Set the event source mapping batch size to 10 for the high priority queue and to 90 for the low priority queue.
- B. Set the delivery delay to 0 seconds for the high priority queue and to 10 seconds for the low priority queue.
- C. Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue.
- D. Set the event source mapping batch window to 10 for the high priority queue and to 90 for the low priority queue.
Correct answer: C
Explanation
Setting the maximum concurrency on the SQS event source mapping directly limits the number of concurrent Lambda instances that can be invoked by that specific queue. By configuring the maximum concurrency to 10 for the high priority queue and 90 for the low priority queue, the total concurrent invocations are capped at 100. Other options like batch size, delivery delay, and batch window control message gathering and delivery timing, but they do not restrict simultaneous Lambda invocations.