AWS Certified Developer – Associate — Question 326
A developer is working on a serverless project. Initial testing shows that a cold start takes about 8 seconds on average for AWS Lambda functions.
Which actions should the developer take to reduce the cold start time? (Choose two.)
Answer options
- A. Add a dependency injection framework to the project.
- B. Reduce the deployment package by including only the needed modules.
- C. Configure provisioned concurrency for the Lambda functions.
- D. Increase the timeout setting for the Lambda functions.
- E. Change the Lambda invocation mode from synchronous to asynchronous.
Correct answer: B, C
Explanation
Reducing the deployment package size minimizes the time AWS Lambda takes to download and unpack the code during initialization. Configuring provisioned concurrency ensures that execution environments are pre-warmed and ready to respond immediately, effectively eliminating cold starts. Other options, like increasing the timeout or changing invocation modes, do not address the root causes of initialization latency.