Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda- Does the deployment package use /tmp?

Tags:

aws-lambda

I need to create a Lambda function using a deployment package. The deployment package zip is about 50 MB. I would like to know if the deployment package will be unzipped into /tmp folder at runtime?

I know there is a limit of 512 MB on the /tmp storage. I plan to copy files from S3 to /tmp for local processing, so I would like to know how much real storage would be available in /tmp in my case.

like image 727
museshad Avatar asked Mar 17 '26 12:03

museshad


1 Answers

As Andriy Ivaneyko has answered, every lambda function gets a /tmp folder which it can use for intermediate processing

But there are some side effects -

  1. The /tmp folder is retained across lambda function invocations.

  2. So when the next instance of the same lambda function is executing, this next instance may have access to the files stored/used by the first invocations.

  3. You will need to explicitly clean the /tmp folder before completing the execution of the lambda function.

like image 179
Dattatray Avatar answered Mar 22 '26 19:03

Dattatray



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!