Skip to content
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-nodejs): Expose AssetStaging.exclude as prop to ignore node_modules from fingerprinting #33627

Open
1 of 2 tasks
relm923 opened this issue Feb 28, 2025 · 0 comments
Labels
@aws-cdk/aws-lambda-nodejs feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@relm923
Copy link
Contributor

relm923 commented Feb 28, 2025

Describe the feature

Add bundling.exclude property to NodejsFunction that is passed to the Asset here

This would allow certain paths from being included in the fingerprint/assetHash giving developers more control without having to fully customize the hashing logic

Use Case

When using the NodejsFunction.nodeModules property the listed modules (and their dependencies) are included directly in the bundled asset. This leads to the containing node_modules directory to directly influence the calculated assetHash. The contents of node_modules can be unstable for a large number of reasons leading to unnecessary deployments

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.181.1

Environment details (OS name and version, etc.)

N/A

@relm923 relm923 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant