tune an sqs-to-lambda event source mapping's batching window and concurrency for cost and latency trade-offs

domain: docs.aws.amazon.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Set BatchSize and MaximumBatchingWindowInSeconds together; batch sizes over 10 require a batching window of at least 1 second.
  2. Understand Lambda's default SQS scaling ramp: 5 concurrent batches initially, increasing by up to 300 concurrent invocations per minute up to a maximum of 1,250 concurrent invocations.
  3. Set ScalingConfig's MaximumConcurrency to cap concurrent invocations from a queue when downstream systems can't handle full-burst Lambda concurrency.
  4. Note that MaximumConcurrency and other throttling approaches are configured per event source mapping and interact with reserved concurrency on the function.
  5. Adjust the batching window upward to reduce Lambda invocation counts and lower cost at the expense of added per-message latency, and downward for latency-sensitive workloads.

Known gotchas

Related routes

Build an EventBridge Pipe from SQS to EventBridge bus with filtering and Lambda enrichment
aws-eventbridge · 6 steps · unrated
Build an EventBridge Pipe from an SQS source to an EventBridge event bus with batch filtering and Lambda enrichment
docs.aws.amazon.com · 6 steps · unrated
Tune Flink job operator chaining and slot sharing groups to control physical task layout and resource isolation on a cluster
flink.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans