Mounting an EFS

Hi, I’m working with a lambda function that needs to have mounted an EFS somewhere in /mnt/.
I’m taking a look at the AWS reference (links at the bottom) and I’m failing to find how to specify the EFS Access Point ARN and the Local Mount Path.
I was expecting something like:

  name: aws
    - arn: "arn:aws:elasticfilesystem:region:id:access-point/apId"
      localMountPath: /mnt/efs1

Is this supported?



Hmmm, actually I’m failing to find this feature in the source code.
I’m going to implement this locally, could you recommend me a developers guide to follow?

1 Like

Need this feature too. Seems only SAM has it now and not the Serverless framework.

Edit: They’ve opened up an issue by the way for this:

Just wanted to mention that I found a workaround. I’m using plugin serverless-default-aws-resource-properties and setting the EFS configuration as a default for all Lambda functions. Because of that, obviously only lambdas that need this configuration should be in this stack.

    - Type: AWS::Lambda::Function
          - Arn: { 'Fn::GetAtt': [ efsAP, Arn ] }
            LocalMountPath: ${self:custom.fsPath}

And it correctly generates the code, but again, with the caveat that all lambdas in this stack will have this configuration.

Hi, I just tried that and I’m getting this error: Cannot read property ‘Resources’ of undefined
Any ideas?

same error for me as well. Cannot read property ‘Resources’ of undefined