How to Prioritize SQS Queues for Lambda with Max Concurrency?
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?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests whether you know that Lambda's event source mapping 'MaximumConcurrency' is a per-source setting that controls how many concurrent function instances each SQS queue can invoke, while the total reserved concurrency on the function limits overall invocations.
Learn how to use AWS Lambda event source mapping maximum concurrency to prioritize processing between multiple SQS queues while limiting total invocations. The community consensus is that option C is correct because it sets per-event-source concurrency limits (10 for high priority, 90 for low priority) to satisfy the requirement.
Choosing option A (batch size) is the most common mistake because batch size controls how many messages are read per batch, not the number of concurrent invocations or priority. Batch size does not enforce priority ordering between two queues.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is correct because the MaximumConcurrency setting on an SQS event source mapping limits the number of concurrent Lambda function instances that each queue can trigger. By setting the high priority queue's maximum concurrency to 10 and the low priority queue's maximum concurrency to 90, the developer ensures the high priority queue always has dedicated concurrency (up to 10) before low priority messages consume the remaining capacity. The function's reserved concurrency is set to 100 to cap total simultaneous invocations, as required. This approach is directly supported by AWS documentation and was confirmed by commenters citing the official SQS event source mapping docs.
Why the Other Options Are Wrong
Option A (batch size) is incorrect because batch size only determines how many messages are delivered in a single Lambda invocation; it does not control concurrency or relative priority between queues. Option B (delivery delay) is incorrect because delay only postpones message visibility, not the order of processing between queues; it would not guarantee that high priority messages are read first. Option D (batch window) is incorrect because the batch window specifies the maximum time to gather records into a single batch, not the number of concurrent invocations or priority. None of these options address the concurrency limits needed to enforce the requirement.
Community Comment Notes
The top-voted comment (likes=2) points out that maximum concurrency is an event source-level setting and that each SQS event source mapped to the same function can have its own concurrency limit. Another comment provides a CloudFormation example showing MaximumConcurrency: 10 and MaximumConcurrency: 90 on separate event source mappings. One insightful comment notes that while none of the options alone guarantee strict priority, setting per-source concurrency to 10/90 combined with a function-level reserved concurrency of 100 meets the requirement in practice. The official AWS documentation link in the comments was widely referenced and is the authoritative source for this behavior.
Official Reference
Exam Strategy
In the exam, when you see multiple SQS queues mapped to one Lambda function and a requirement to prioritize or limit concurrency, immediately think of the event source mapping's 'MaximumConcurrency' property. Remember that reserved concurrency on the function is a separate limit, and you may need to set both the overall function limit and per-source limits to satisfy all constraints. Eliminate options that confuse batch size, batch window, or delivery delay with concurrency.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →