Skip to content

feature request: support concurrent execution of Lambdas with a SQS Event Source #13328

@onlyann

Description

@onlyann

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

When an SQS queue has multiple messages available and is configured as an event source for a Lambda function, AWS Lambda will:

  1. Poll the queue and retrieve messages (up to the batch size)
  2. Invoke multiple concurrent Lambda instances to process batches in parallel
  3. Respect the maximumConcurrency setting (or account-level concurrency limits)
  4. Scale up to handle the message backlog efficiently

Example: If a queue has 100 messages and batchSize: 10, AWS would invoke multiple Lambda instances simultaneously (e.g., 5-10 concurrent executions), each processing 10 messages, rather than processing them sequentially one batch at
a time.

Actual Behavior

LocalStack appears to execute Lambda instances sequentially when processing SQS event source mappings:

  1. Retrieves a batch of messages from the queue
  2. Invokes a single Lambda instance
  3. Waits for that instance to complete
  4. Only then retrieves the next batch and invokes another instance

This results in significantly slower processing compared to AWS behavior and makes it difficult to test concurrent execution scenarios.

🧑‍💻 Implementation

No response

Anything else?

• AWS Lambda with SQS https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html
• Scaling and processing https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-scaling

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws:lambdaAWS Lambdaaws:sqsAmazon Simple Queue Servicestatus: backlogTriaged but not yet being worked ontype: featureNew feature, or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions