An AWS Lambda function downloads temporary files totaling up to 3 GB into /tmp during a single invocation and fails with a 'no space left on device' error, because the default ephemeral storage is only 512 MB. The team wants the simplest fix and does not want to add a network file system dependency. What should the team do?
Choose one.
Show answer
Answer: A
Lambda ephemeral storage can be configured independently of memory from 512 MB up to 10,240 MB. Raising it above 3 GB fixes the error with a single configuration change.
The correct answer is Increase the function's ephemeral storage (/tmp) setting, which can be configured up to 10,240 MB. Ephemeral storage is a per-function setting (EphemeralStorage in the Lambda API, AWS SAM and CloudFormation) that ranges from 512 MB to 10,240 MB and is billed only for the amount above the included 512 MB. Setting it to, for example, 4 GB gives the function enough local disk without any code or architecture change. Amazon EFS would provide space, but it requires VPC configuration, mount targets and access points, which is the network file system dependency the team wants to avoid. Memory and /tmp size are configured separately, so increasing memory does not add disk space. A longer timeout does not free any space on the device.