Write temporary files from Google Cloud Function
Solution 1:
Yes, /tmp
is an in-memory mount. From https://cloud.google.com/functions/docs/concepts/exec#file_system:
File system
The only writeable part of the filesystem is the
/tmp
directory, which you can use to store temporary files in a function instance. This is a local disk mount point known as a "tmpfs" volume in which data written to the volume is stored in memory. Note that it will consume memory resources provisioned for the function.