-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CDK followSymlinks not supported #6959
Comments
Hi @vieirai, thanks for opening the issue. I'm trying to understand this more. I tried playing around with an image type lambda function and |
Hi @hnnasit , thank you for looking into this. In short our project was doing: cdk synth SymlinkStack --no-staging > template.yml
sam build symlink
sam local invoke symlink And this way it does not resolve the symlink references and we end up with broken files inside the container. I can confirm that if we follow the docs example and do: cdk synth
sam build -t cdk.out/SymlinkStack.template.json symlink
sam local invoke -t cdk.out/SymlinkStack.template.json symlink Then it does work. Not sure if this is worth highlighting in the docs or not, but either way I'm happy for you to resolve this. |
This issue seems more like a feature request than a bug since there doesn't seem to be anything broken in the integration at this point and the recommendation is to extend the current functionality to support symlinks. |
SAM should support the CDK
followSymlinks
config option.Currently SAM is the recommended tool for running CDK applications locally, as such I expect my CDK config to be compatible with SAM, however that is not always the case.
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-cdk-testing.html
Proposal
The CDK
followSymlinks
flag should be supported by SAM.https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.AssetImageCodeProps.html#followsymlinks
Additional Details
The more I think about this, I'm not even sure if this is a SAM issue, or a Cloudformation issue or a CDK issue.
Currently CDK seems to be outputting
AWS::Lambda::Function
resources, which are part of the Cloudformation spec.I guess CDK would have to be extended to output this flag in the
Metadata
and them SAM would have to implement some logic on top?The text was updated successfully, but these errors were encountered: