Course menuDVA-C02

Exams / DVA-C02 / Lambda configuration / Question 1

DVA-C02 practice question: Lambda configuration

Development with AWS Services 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 Lambda function downloads video files of up to 4 GB from Amazon S3, transcodes them locally and uploads the result. The function fails with "No space left on device" when writing large files. Memory use and duration are within limits. What should the developer change?

Choose one answer.

  1. A. Increase the function's ephemeral storage setting for /tmp.
  2. B. Increase the function's memory so it has more local disk space.
  3. C. Add a Lambda layer that contains a larger temporary directory.
  4. D. Package the function as a container image so it can use the image's disk.
Show the answer and explanation

Answer: A

  • A. Right: Correct. Ephemeral storage can be configured up to 10,240 MB, enough for files of this size.
  • B. Wrong: Memory and ephemeral storage are separate settings. More memory gives more CPU, not more space in /tmp.
  • C. Wrong: Layers add read-only content to the function. They do not increase writable storage.
  • D. Wrong: The image holds code and dependencies. Writable scratch space is still /tmp, sized by the ephemeral storage setting.

Explanation

Lambda gives each execution environment a writable /tmp directory. Its size is a separate setting called ephemeral storage, configurable from 512 MB to 10,240 MB. Functions that process large files locally need it raised.

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.