AWS Certified DevOps Engineer – ProfessionalResilient Cloud SolutionsMedium
A company is building a new serverless application using AWS Lambda functions that process real-time data streams from Amazon Kinesis. During peak load, the Lambda functions experience throttling, leading to data processing delays and increased Kinesis shard iterator age. The developers want to ensure that Lambda has sufficient concurrency to process the Kinesis stream efficiently without manual intervention, even during sudden spikes, and avoid cold starts as much as possible for critical functions. Which Lambda feature should they implement?
- AAdjust the batch size and batch window for the Kinesis event source mapping.
- BImplement a Dead-Letter Queue (DLQ) for the Lambda functions.
- CIncrease the account-level concurrent execution limit for Lambda functions.
- DConfigure Provisioned Concurrency for the critical Lambda functions.
Show answer & explanationAnswer & explanation
Correct answer: D. Configure Provisioned Concurrency for the critical Lambda functions.
Provisioned Concurrency initializes a specified number of execution environments for your Lambda functions, keeping them warm and ready to respond immediately. This prevents throttling and eliminates cold starts, ensuring that critical functions processing Kinesis streams can handle sudden spikes and process data efficiently without delays.
Why the other options are wrong
- A. Adjusting batch size/window can optimize processing but doesn't prevent cold starts or guarantee immediate concurrency during sudden spikes.
- B. A DLQ handles failed invocations but does not prevent throttling, cold starts, or improve the real-time processing capability of the function.
- C. Increasing account limits is a global setting and might not target specific function needs or prevent cold starts for individual critical functions.
Lambda Provisioned Concurrency
A Lambda feature that pre-initializes a specified number of execution environments for a function, keeping them warm and ready to respond instantly.
- Eliminates cold starts for critical functions.
- Ensures low latency and high responsiveness.
- Helps handle sudden traffic spikes without throttling.
Memory trick: Provision concurrency, power through peaks, perfectly.