Open Dreamescaper opened 2 years ago
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: source_code_hash = data.archive_file.zip_file.output_base64sha256
And this doesn't work and updates all the time when I build it
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: https://github.com/aws/aws-cdk/pull/2931 . Probably same approach could be used.
This is a :rocket: Feature Request