Mar 26, 2021
Thank you for reading. Great question!
Lambda functions run inside what AWS calls "execution environments". These environments provide you with a "/tmp" directory that you can use for temporary file storage or caching. Remember though the data stored here gets wiped off if the function remains inactive for some time.
See the official documentation for details:
https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html (Look under "Shutdown phase")