nerdexam
Amazon

DVA-C02 · Question #294

A company has built an AWS Lambda function to convert large image files into output files that can be used in a third-party viewer application. The company recently added a new module to the function

The correct answer is B. Use Lambda layers to package and load dependencies.. Lambda Layers (B) solve this directly: by extracting large dependencies into a separate layer, the main function package stays small, which means faster uploads and deployments when you update only the function code - the layer is already cached and doesn't need to be re-uploaded

Submitted by wei.xz· Mar 5, 2026Deployment

Question

A company has built an AWS Lambda function to convert large image files into output files that can be used in a third-party viewer application. The company recently added a new module to the function to improve the output of the generated files. However, the new module has increased the bundle size and has increased the time that is needed to deploy changes to the function code. How can a developer increase the speed of the Lambda function deployment?

Options

  • AUse AWS CodeDeploy to deploy the function code.
  • BUse Lambda layers to package and load dependencies.
  • CIncrease the memory size of the function.
  • DUse Amazon S3 to host the function dependencies.

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    78% (29)
  • C
    5% (2)
  • D
    14% (5)

Explanation

Lambda Layers (B) solve this directly: by extracting large dependencies into a separate layer, the main function package stays small, which means faster uploads and deployments when you update only the function code - the layer is already cached and doesn't need to be re-uploaded each time.

A is wrong because CodeDeploy manages traffic shifting and rollout strategies (canary, linear deployments), not bundle size or upload speed - it doesn't make a large package smaller or faster to transfer.

C is wrong because increasing memory affects runtime execution performance, not deployment time; the package still has to be uploaded at full size regardless of how much memory the function has.

D is wrong because Lambda function code must be packaged and deployed through Lambda's own mechanism - you can reference S3 for the ZIP artifact, but that doesn't reduce bundle size or meaningfully speed up deployment compared to using layers.

Memory tip: Think of layers as shared shelves - you put the heavy books (dependencies) on the shelf once, and only carry your thin notebook (function code) each time you need to make a change. Smaller package = faster deployment.

Topics

#Lambda Layers#Lambda Deployment#Dependency Management#Deployment Optimization

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice