-
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
Asset uploadIfChanged
only runs for files not for directories
#1997
Closed
brad-jones opened this issue
Mar 12, 2019
· 1 comment
· Fixed by #2931 or MechanicalRock/tech-radar#14 · May be fixed by MechanicalRock/cdk-constructs#5, MechanicalRock/cdk-constructs#6 or MechanicalRock/cdk-constructs#7
Closed
Asset uploadIfChanged
only runs for files not for directories
#1997
brad-jones opened this issue
Mar 12, 2019
· 1 comment
· Fixed by #2931 or MechanicalRock/tech-radar#14 · May be fixed by MechanicalRock/cdk-constructs#5, MechanicalRock/cdk-constructs#6 or MechanicalRock/cdk-constructs#7
Comments
It seems like it's linked to the order of the files in the zip file (not the timestamps of the files themselves) #2759 |
4 tasks
This was referenced Aug 22, 2019
This was referenced Dec 12, 2019
This was referenced Jan 20, 2020
This was referenced Sep 24, 2024
Open
This was referenced Sep 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using
new AssetCode('/some/path')
, a zip file is created usingprepareZipAsset
and then uploaded usingprepareFileAsset
which executesuploadIfChanged
.The problem is that the zip file obviously has some timestamp data (or similar) in it that changes the hash of the file. So on every single deployment, regardless of if the asset has actually changed or not, a new asset is uploaded.
prepareZipAsset
should either produce a idempot zip file or it should run a similarzipIfChanged
function.Anyway my workaround for now has been to use https://github.com/aws/aws-lambda-go/blob/master/cmd/build-lambda-zip/main.go to generate the zip of my lambdas and then get CDK to just upload the zip.
FYI:
build-lambda-zip
does produce an idempot zip file.The text was updated successfully, but these errors were encountered: