Rahul Panwar
Rahul Panwar

Reputation: 735

Can I store a temp file on AWS Lambda Function?

I am writing a lambda function for file extraction and need to store a file while performing this function so need to store that file in aws lambda function . Is it possible to store store a file on lambda .

Upvotes: 67

Views: 92331

Answers (1)

poida
poida

Reputation: 3599

Yes, quoting from the AWS Lambda FAQ

Each Lambda function receives 500MB of non-persistent disk space in its own /tmp directory.

https://aws.amazon.com/lambda/faqs/

Note that as the commenters point out, it is only reliably there for a single execution of your function. You don't have control over the execution environment, so subsequent runs may be in different instances of your lambda function.

If you need the data to be more persistent you should use AWS S3 or EBS.

Upvotes: 83

Related Questions