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

'package' command should be able to create deterministic zip archives #195

Open
Dreamescaper opened this issue Dec 2, 2021 · 3 comments
Labels
feature-request A feature should be added or improved. module/cli-ext p2 This is a standard priority issue queued

Comments

@Dreamescaper
Copy link

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

@Dreamescaper Dreamescaper added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 2, 2021
@ashishdhingra
Copy link
Contributor

Appears to be a valid feature request. May be introduce a flag to alter this behavior. Needs discussion with the team.

@ashishdhingra ashishdhingra added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Jan 20, 2022
@ashishdhingra ashishdhingra added the p2 This is a standard priority issue label Dec 8, 2022
@lowkasen
Copy link

+1

@lowkasen
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/cli-ext p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

3 participants