How to Prioritize SQS Queues for Lambda with Max Concurrency?
Short answer
C Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue.
Question
Key Takeaways
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.
Common mistake: 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.
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
- https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
- https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-concurrency.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
These links open the official vendor documentation in a new tab.
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.
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
preachr 👍 2 Answered CYou can use the maximum concurrency setting to control scaling behavior for your SQS event sources. The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke. Maximum concurrency is an event source-level setting. If you have multiple Amazon SQS event sources mapped to one function, each event source can have a separate maximum concurrency setting. You can use maximum concurrency to prevent one queue from using all of the function's reserved concurrency or the rest of the account's concurrency quota. There is no charge for configuring maximum concurrency on an Amazon SQS event source.
-
CrescentShared 👍 2 Answered CNone of them seems to be guarantee the requirement. Set the reserved concurrency on the Lambda function to 100 to limit the total invocations across all triggers. Configure the event source mapping for the high priority queue to use a maximum concurrency that ensures its messages are processed first. This could be most of the reserved concurrency (but not all, to allow for some processing of the low priority queue). Configure the event source mapping for the low priority queue with a smaller maximum concurrency to ensure it doesn't starve the high priority queue of Lambda resources.
-
KarBiswa 👍 2 Answered Chttps://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
-
albert_kuo 👍 1 Answered CResources: HighPriorityEventSourceMapping: Type: AWS::Lambda::EventSourceMapping Properties: BatchSize: 10 MaximumConcurrency: 10 EventSourceArn: arn:aws:sqs:region:account-id:high-priority-queue FunctionName: myLambdaFunction LowPriorityEventSourceMapping: Type: AWS::Lambda::EventSourceMapping Properties: BatchSize: 10 MaximumConcurrency: 90 EventSourceArn: arn:aws:sqs:region:account-id:low-priority-queue FunctionName: myLambdaFunction
-
monishvster 👍 2 Answered CShould be C
Show 1 more comment
-
65703c1 👍 1 Answered CC is the correct answer.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →