-
Notifications
You must be signed in to change notification settings - Fork 87
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
'package' command should be able to create deterministic zip archives #195
Comments
Appears to be a valid feature request. May be introduce a flag to alter this behavior. Needs discussion with the team. |
+1 |
What is the workaround for this issue? I currently use: And this doesn't work and updates all the time when I build it |
This is a confusing issue when AWS's Lambda CDK C# documentation recommends using dotnet lambda package to build and deploy with CDK without warning that this is going to cause the Lambda to be updated every time CDK is deployed due to the package command's current behavior. @lowkasen The workaround I found for anybody else who stumbles across this - I adapted from here which used the zip but it seemed better to me to use the file contents directly.
|
We create zip archives for our lambdas using "dotnet lambda package" command, and then use "cdk deploy" to deploy them to our environments. Currently this has an issue - created zip archives contain timestamps, therefore those archives are different for each build, and therefore CDK deploys them each time even if nothing is changed.
As a workaround, currently we provide custom AssetHash (based on archive content), but I'd prefer to remove it.
Describe the Feature
'package' command should produce zip archives with striped timestamps and with consistent order.
Is your Feature Request related to a problem?
Slower CDK deployments.
Describe alternatives you've considered
Custom AssetHash.
Additional Context
This issue was actually solved in CDK itself: aws/aws-cdk#2931 . Probably same approach could be used.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: