
Answer-first summary for fast verification
Answer: Configure Lambda SnapStart.
**Explanation:** **Why D (Configure Lambda SnapStart) is correct:** 1. **Lambda SnapStart** is specifically designed for Java 11 (and later) Lambda functions to reduce cold start latency by taking a snapshot of the initialized execution environment after the first invocation. 2. **Cost-effectiveness**: SnapStart doesn't incur additional costs like provisioned concurrency. It reduces cold starts without requiring you to pay for pre-warmed capacity. 3. **Java-specific optimization**: Java applications typically have longer cold starts due to JVM initialization, and SnapStart addresses this by reusing snapshots. 4. **Matches requirements**: The company wants to reduce cold starts and outlier latencies when scaling up, and doesn't have strict latency requirements, making SnapStart ideal. **Why other options are incorrect:** - **A (Configure Lambda provisioned concurrency)**: While this reduces cold starts by keeping functions warm, it's more expensive as you pay for provisioned capacity even when not in use. Not the most cost-effective solution. - **B (Increase the timeout of the Lambda functions)**: This doesn't address cold start latency at all. Timeout only controls how long a function can run, not startup time. - **C (Increase the memory of the Lambda functions)**: While more memory can slightly improve performance, it doesn't specifically target Java cold start issues and increases costs without directly addressing the core problem. **Key considerations:** - Lambda SnapStart is free and specifically optimized for Java runtime cold starts - Provisioned concurrency is better for strict latency requirements but costs more - The question emphasizes "MOST cost-effectively" which makes SnapStart the clear choice
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company wants to use an event-driven programming model with AWS Lambda. The company wants to reduce startup latency for Lambda functions that run on Java 11. The company does not have strict latency requirements for the applications. The company wants to reduce cold starts and outlier latencies when a function scales up.
Which solution will meet these requirements MOST cost-effectively?
A
Configure Lambda provisioned concurrency.
B
Increase the timeout of the Lambda functions.
C
Increase the memory of the Lambda functions.
D
Configure Lambda SnapStart.
No comments yet.