-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(lambda-nodejs): custom asset hash #16412
Conversation
Add a `assetHash` prop to customize the asset hash. Closes aws#16157
924c117
to
ebfd5f2
Compare
@nija-at can you check this? thx! |
@jogold - can you update the PR description with more details on what is going on here and why this is needed? I couldn't fully understand it from the linked issue. |
updated |
I'm still not following the motivation. What is a use case for this? Why would we want to provide such an option? It feels that this is going to be used incorrectly more often than correctly, and thereby users are going to shoot themselves in the foot. |
@oyed can you detail your use case here? One use case I can think of: you don't want the hash to change if the way Identifying the specific input files of a
We're just exposing an asset option from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
By default the asset hash for a `NodejsFunction` is based on the bundling output, the result of the `esbuild` bundling. Add a `assetHash` prop to customize the asset hash and allow users to implement their own logic. This can be useful if users want to invalidate the asset based on specific (input) file contents or logic. Closes aws#16157 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
By default the asset hash for a
NodejsFunction
is based on thebundling output, the result of the
esbuild
bundling.Add a
assetHash
prop to customize the asset hash and allow users toimplement their own logic. This can be useful if users want to invalidate
the asset based on specific (input) file contents or logic.
Closes #16157
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license