Improving throughput of serverless streaming workloads for Kafka
Compute Blog
This article provides guidance on optimizing AWS Lambda for processing high-volume Apache Kafka streams with focus on throughput and scaling.
- Use Provisioned Mode for bursty workloads to ensure predictable, fast scaling instead of on-demand mode
- Apply ESM filtering to drop irrelevant records before Lambda invocation, reducing cost and concurrency
- Configure batch window and batch size to process more records per invocation and improve efficiency
- Optimize handler code by reducing per-record work and increasing memory allocation for better CPU
- Monitor OffsetLag, Duration, Concurrency, and Errors metrics to detect issues and guide tuning
- Single provisioned poller can process up to 5 MB/s of Kafka data
- Follow iterative optimization loop: baseline, filter, batch, speed up, test spikes, alert, re-evaluate
The article emphasizes that effective Kafka-Lambda optimization requires understanding the poll-filter-batch-invoke workflow and using observability metrics to drive configuration decisions.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
Nov 24
2025
2025
AWS Lambda announces enhanced error handling capabilities for Kafka event processing
Nov 21
2025
2025
AWS Lambda announces new capabilities to optimize costs up to 90% for Provisioned mode for Kafka ESM
Nov 12
2025
2025
Amazon Managed Service for Prometheus collector integrates with Amazon Managed Streaming for Apache Kafka
Mar 21
2024
2024
Build an end-to-end serverless streaming pipeline with Apache Kafka on Amazon MSK using Python
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.