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: (Look under "Shutdown phase")