AWS Certified Developer – Associate (DVA-C02) — Question 449
A developer is building an application that uses an AWS Lambda function to process data. The application requires minimum latency. The Lambda function must have predictable function start times. All setup activities for the execution environment must happen before invocation of the Lambda function.
Which solution will meet these requirements?
Answer options
- A. Increase the memory of the Lambda function to the maximum amount. Configure an Amazon EventBridge rule to schedule invocations of the Lambda function every minute to keep the execution environment active.
- B. Optimize the static initialization code that runs when a new execution environment is prepared for the first time. Decrease and compress the size of the Lambda function package and the imported libraries and dependencies.
- C. Increase the reserved concurrency of the Lambda function to the maximum value for unreserved account concurrency. Run any setup activities manually before the initial invocation of the Lambda function.
- D. Publish a new version of the Lambda function. Configure provisioned concurrency for the Lambda function with the required minimum number of execution environments.
Correct answer: D
Explanation
Provisioned concurrency initializes a specified number of execution environments beforehand, ensuring that all setup and initialization code runs prior to invocation to deliver predictable, low-latency performance. While optimizing code and deployment packages (Option B) or using EventBridge to keep functions warm (Option A) can reduce cold start duration, they do not guarantee that initialization is completed before the actual invocation. Reserved concurrency (Option C) only limits the maximum number of concurrent instances and does not pre-warm environments.