Accessing a file concurrently on EFS does not seem to be working as expected. Specifically, any writes to a file does not appear to be read the same from two different Lambda environments.
- Two Lambda function invocations read the same file on an EFS volume concurrently (different execution environments), they see the same data.
- Function 1 updates the file and closes the file. Function 1 reads the file and sees the updated data.
- Function 2 reads the file again, but reads stale data (from nfs cache setting?).
How do I ensure that all function invocations see the newly written data in the file?
Looks like I need to set mount options for the NFS client, specifically
noac
, but I'm not seeing any documentation on how to set NFS mount options with Lambda.