aws / aws/aws-sam-cli

Feature request: Reproducible ZIP packages

Open
#4,645 4 comments 0 reactions 0 assignees View on GitHub
type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

For verification/auditing purposes, it is quite nice to have reproducible SAM zip packages.

### Proposal

We will need to sort the files here in a predictable way before adding them to the zip.

https://github.com/aws/aws-sam-cli/blob/ee23953806be066ebfb72dd42e188de4866483ae/samcli/lib/package/utils.py#L241-L242

Also, we should reset the timestamps to epoch.

Things to consider:
1. Will this require any updates to the [SAM Spec](https://github.com/awslabs/serverless-application-model) - No
2. Will do this after https://github.com/aws/aws-sam-cli/pull/4644 is merged in.

### Additional Details

I don't mind doing this myself. Semi-related to #4622.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.