-
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
(aws-s3-deployment): empty files are uploaded to bucket #19042
Comments
Hey @I2olanD, Thank you for reporting this, but I have been unable to reproduce the behavior. Could you please provide more context so we can properly evaluate this problem? |
Hi @NGL321, thanks for the reply! I migrated to v2 and the problem is gone now. But what worked for me before migrating was deleting cdk.out folder and remove all the assets from S3. Best |
|
I'm also seeing this on CDK I haven't looked deeper into trying to debug the why of this yet. Will update this issue with details if I find anything useful. Potentially related: |
So I basically followed the advice in this comment as the basis for further exploration:
I basically deployed my stack with From there I noticed that it basically wasn't trying to generate/upload the new asset zip's because it could already see that an existing zip existed in the staging bucket. Because that zip was corrupted, it had the effect of never replacing the corrupted zip file. The solution was to delete the corrupted zip from the staging bucket and local caches, then run the deploy again with Obviously this doesn't identify how the corrupted zip was created/uploaded in the first place, but at least it gives enough detail that it would be possible to trace the logic and ensure that old cached files in the staging bucket are at least invalidated properly so that the newly built assets are uploaded in their place. Full Writeup(🔒 PrivateRef)
|
What is the problem?
When i upload my locally build dist, files are uploaded with 0 bytes (empty files).
Reproduction Steps
Use s3-deployment to upload local assets.
What did you expect to happen?
Files are uploaded correctly
What actually happened?
Files are empty
CDK CLI Version
1.132.0
Framework Version
No response
Node.js Version
16.14.0
OS
MacOS 12.2.1
Language
Typescript
Language Version
Typescript 3.9.7
Other information
_No response
_
The text was updated successfully, but these errors were encountered: