AWS Certified Developer – Associate (DVA-C02) — Question 455

A developer created reusable code that several AWS Lambda functions need to use. The developer bundled the code into a zip archive. The developer needs to deploy the code to AWS and update the Lambda functions to use the code.

Which solution will meet this requirement in the MOST operationally efficient way?

Answer options

Correct answer: C

Explanation

AWS Lambda layers are specifically designed to share common code, libraries, or dependencies across multiple functions, making Option C the most operationally efficient solution. Option A is incorrect because Lambda does not support directly importing code from an arbitrary S3 zip archive path at runtime. Option B introduces unnecessary network overhead, latency, and invocation costs, while Option D adds the overhead of managing container image builds and deployments for simple code sharing.