-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-lambda): Add validation to verify the filesystem configuration mountPath matches the AccessPoint path #17526
Comments
By Per the CFN docs, this is configurable - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath. I've not tested this myself, but if that's not the access the value is always fixed, we can add a validation that these paths are the same. We'll still need the property in order to support imported EFS access points. |
Yes, that's the one. From my testing, it has to match the root path or it doesn't work. Very confusing for sure. |
@nija-at what do you think about potential resolutions? Maybe this is a bug in lambda and should be dealt with upstream? |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Still relevant, I believe |
### Issue # (if applicable) Closes #17526 ### Reason for this change Show user-friendly error message faster (before deployment) ### Description of changes Added format and length validation according to [AWS::Lambda::Function FileSystemConfig document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath) ![image](https://github.com/user-attachments/assets/5296cef5-9b33-4ddc-bfc2-8e6fac00dc66) ### Description of how you validated changes - Added unit test - No integration test because I think it is overkill ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. |
### Issue # (if applicable) Closes #17526 ### Reason for this change Show user-friendly error message faster (before deployment) ### Description of changes Added format and length validation according to [AWS::Lambda::Function FileSystemConfig document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath) ![image](https://github.com/user-attachments/assets/5296cef5-9b33-4ddc-bfc2-8e6fac00dc66) ### Description of how you validated changes - Added unit test - No integration test because I think it is overkill ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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.
The text was updated successfully, but these errors were encountered: