205k views
4 votes
What if I need scratch space on disk for my AWS Lambda function?

User Concept
by
8.5k points

1 Answer

4 votes

Final answer:

You can use the /tmp directory for scratch space on disk in AWS Lambda, but it's important to remember that the storage is ephemeral and specific to each function invocation.

Step-by-step explanation:

If you need scratch space on disk for your AWS Lambda function, you can use the /tmp directory to temporarily store files. This directory provides 512 MB of storage capacity.

When your Lambda function is invoked, it can read from and write to files within the /tmp directory. However, keep in mind that the storage in /tmp is ephemeral and specific to each function invocation. The files stored in /tmp are not accessible across different invocations or concurrent function executions. Therefore, it is important to handle your file storage needs accordingly.

User Tomer Amir
by
8.2k points

Related questions

1 answer
2 votes
196k views
1 answer
3 votes
132k views
1 answer
3 votes
59.1k views