I've created a lambda function. I created a Elastic File System (EFS) and access points using all the default settings. I attached the EFS to the lambda function, again just using the defaults.
But! There is no write access to EFS.
What did I miss?
Hope some kind person knows :)
Notes....
The current answer doesn't seem to work. I've also been onto AWS support for over a week. They seem to think the EFS is not mounting.
EFS is mounted to lambda at = /mnt/fs
EFS Access point - Root Directory Path = / (A suggestion of changing this to /fs causes an internal server error, AWS support suggested /mnt/fs which also causes an internal service error).
AmazonElasticFileSystemClientFullAccess and AWSLambdaVPCAccessExecutionRole added to execution role.
Test Node js example:
exports.handler = function(event, ctx, callback) {
const fs = require("fs");
fs.mkdir('/mnt/fs/newfolder', { recursive: true }, (err) => {
callback(null, {
statusCode: 200,
"content-type": "text/html",
body: (err || "ok").toString()
})
});
};