Skip to content

(aws-lambda): Add validation to verify the filesystem configuration mountPath matches the AccessPoint path #17526

@gshpychka

Description

@gshpychka

What is the problem?

When attaching an EFS mount point to a lambda, there is only one correct value for the mountPath, and that is /mnt/{access point root path}. Any other value will result in an OS-level access denied exception. Since the root path can be accessed from the access point by CDK, why expose this parameter at all?

Reproduction Steps

Create an EFS Access Point. Attach it to a Lambda with mountPoint set to anything other than /mnt/{access point root path}. Attempt to write anything to the filesystem from the lambda.

What did you expect to happen?

File I/O operations work normally.

What actually happened?

Access denied I/O errors if the mount path differs from the access point's root path.

CDK CLI Version

1.132

Framework Version

No response

Node.js Version

16.11.1

OS

Linux

Language

Typescript, Python, .NET, Java, Go

Language Version

No response

Other information

Either infer the mountPath from the access point, or specify clearly in the documentation that it has to follow this strict pattern and is not customizable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-lambdaRelated to AWS LambdabugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions