A Lambda function processes objects from an S3 bucket but some invocations are slower than others due to initialization (loading libraries, creating clients). The developer needs predictable, low-latency invocation durations and requires that initialization work occur during allocation time rather than during each invocation. Which combination of steps will achieve this? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Enable provisioned concurrency for the Lambda function so the required number of execution environments are pre-initialized., Deploy your changes and publish a new, immutable version of the Lambda function..
Why this is the answer
Enabling provisioned concurrency for the Lambda function ensures that a specified number of execution environments are pre-initialized and ready to respond to invocations. This eliminates cold starts for those pre-warmed instances, leading to predictable, low-latency invocation durations as initialization work (loading libraries, creating clients) occurs during the allocation of these environments, not during each invocation. Deploying changes and publishing a new, immutable version of the Lambda function is a standard best practice for managing Lambda code. It allows for controlled deployments, easy rollbacks, and ensures that the provisioned concurrency is applied to a specific, stable version of the function. Using the $LATEST version is generally not recommended for production as it's mutable and can change unexpectedly. Setting reserved concurrency limits the maximum concurrent invocations but doesn't pre-initialize environments. Creating a schedule group in Amazon EventBridge Scheduler is for scheduled invocations, not for optimizing cold starts.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed