AWS Certified Developer – Associate — Question 29
A Developer is working on a serverless project based in Java. Initial testing shows a cold start takes about 8 seconds on average for AWS Lambda functions.
What should the Developer do to reduce the cold start time? (Choose two.)
Answer options
- A. Add the Spring Framework to the project and enable dependency injection.
- B. Reduce the deployment package by including only needed modules from the AWS SDK for Java.
- C. Increase the memory allocation setting for the Lambda function.
- D. Increase the timeout setting for the Lambda function.
- E. Change the Lambda invocation mode from synchronous to asynchronous.
Correct answer: B, C
Explanation
Reducing the deployment package size (Option B) ensures that only necessary modules are loaded, which can significantly decrease cold start times. Increasing memory allocation (Option C) not only improves performance but can also reduce cold start duration due to better resource availability. The other options do not directly address the cold start issue or could potentially exacerbate it.