Course menuDVA-C03

Exams / DVA-C03 / Lambda configuration / Question 1

DVA-C03 practice question: Lambda configuration

Development with AWS Services A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A Lambda function unzips customer archives from Amazon S3 into /tmp and then processes the files.

Each archive is about 2 GB and unpacks to around 7 GB. Runs fail with "No space left on device" while the archive is being unpacked. Memory use and run time are well within their limits, and the team wants the smallest change that fixes the problem.

What should the developer change?

Choose one answer.

  1. A. Increase the function's ephemeral storage setting to 10,240 MB, the maximum allowed.
  2. B. Increase the function's memory to 10,240 MB, which also gives it more disk space in /tmp.
  3. C. Add a Lambda layer that contains a larger directory for the archives to unpack into.
  4. D. Package the function as a container image, which provides a larger writable disk for /tmp.
Show the answer and explanation

Answer: A

  • A. Right: Correct. Ephemeral storage sets the size of the writable /tmp directory. It can be set from 512 MB up to 10,240 MB, which leaves room for the unpacked files. Learn more: Configuring ephemeral storage for Lambda functions (opens in a new tab)
  • B. Wrong: Memory and ephemeral storage are separate settings. More memory gives more CPU and RAM, but the size of /tmp does not change.
  • C. Wrong: Layers add read-only content to the function. They do not add writable space, so the archives still have nowhere to unpack.
  • D. Wrong: The image holds code and dependencies. Writable space in /tmp is still set by the ephemeral storage setting, not by the image.

Explanation

Each Lambda execution environment has a writable /tmp directory whose size is set by the ephemeral storage setting. That setting is separate from memory and can be raised up to 10,240 MB, which gives room for the unpacked files.

Study

Keep practicing

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

Want more on Lambda configuration? The 5 full-length practice sets have 9 more Lambda configuration questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets