How to Prioritize SQS Queues for Lambda with Max Concurrency?

AWS Lambda Event Source Mappings (Amazon SQS)

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?

  1. Set the event source mapping batch size to 10 for the high priority queue and to 90 for the low priority queue.
  2. Set the delivery delay to 0 seconds for the high priority queue and to 10 seconds for the low priority queue.
  3. Set the event source mapping maximum concurrency to 10 for the high priority queue and to 90 for the low priority queue. Source Reference Answer
  4. Set the event source mapping batch window to 10 for the high priority queue and to 90 for the low priority queue.

Community Votes

C
100%

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)

albert_kuo 👍 1 Selected: C
Resources: 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
preachr 👍 2 Selected: C
You 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.
65703c1 👍 1 Selected: C
C is the correct answer.
KarBiswa 👍 2 Selected: C
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
monishvster 👍 2 Selected: C
Should be C
CrescentShared 👍 2 Selected: C
None 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.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 →

← Back to DVA-C02 Study Guide