Course menuDVA-C02

Exams / DVA-C02 / Packaging and application configuration / Question 2

DVA-C02 practice question: Packaging and application configuration (2 of 3)

Deployment A free question from our original DVA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

A developer is packaging a Lambda function that uses machine learning libraries. With all dependencies, the unzipped package is about 1.5 GB, so the .zip deployment fails. The developer wants to ship the dependencies with the function and keep using Lambda. What should the developer do?

Choose one answer.

  1. A. Package it as a container image in Amazon ECR and create the function from the image.
  2. B. Move the libraries into Lambda layers and attach those layers to the function.
  3. C. Upload the .zip file to Amazon S3 and point the function at that S3 object.
  4. D. Increase the function's memory to the maximum so it can hold a larger package.
Show the answer and explanation

Answer: A

  • A. Right: Correct. Container images can be up to 10 GB uncompressed, which comfortably fits these dependencies.
  • B. Wrong: The 250 MB unzipped limit includes all layers, so splitting the package across layers does not help.
  • C. Wrong: Uploading through S3 avoids the direct upload limit, but the 250 MB unzipped limit still applies.
  • D. Wrong: Memory affects compute resources at run time. It does not change deployment package size limits.

Explanation

Lambda .zip packages, including layers, are limited to 250 MB unzipped. Container images stored in Amazon ECR can be up to 10 GB, which suits functions with large dependencies such as ML libraries. Choosing between .zip and image packaging is a common deployment decision.

Study

Keep practising

Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.