(aws-cdk/aws-s3-deployment): Directory deployment doesn't work
See original GitHub issueHello,
It looks like that BucketDeployment
doesn’t work for directories. I have an non-empty directory with some files which i want to deploy. When I deploy, i receive an error Uploaded file must be a non-empty zip
. However the documentation states that source of the BucketDeployment
can be a directory.
Reproduction Steps
Create a resource similar to this one:
s3_deployment.BucketDeployment(
self,
"MyResource",
sources=[s3_deployment.Source.asset("./mydir")],
destination_bucket=workspace_bucket,
destination_key_prefix="/mydir",
vpc=vpc,
vpc_subnets=ec2.SubnetSelection(subnets=vpc.private_subnets)
)
where mydir
is a non empty directory.
What did you expect to happen?
mydir
folder is synced with with destination folder.
What actually happened?
I receive an error Uploaded file must be a non-empty zip
Environment
- CDK CLI Version : 1.95.1
- Framework Version: 1.95.1
- Node.js Version: v15.12.0
- OS : Mac OS 11.1
- Language (Version): Python 3.9.2
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Troubleshooting common AWS CDK issues
When deploying my AWS CDK stack, I receive a NoSuchBucket error. Your AWS environment has not been bootstrapped, and so does not have...
Read more >aws-cdk/aws-s3-deployment module - AWS Documentation
IMPORTANT The aws-s3-deployment module is only intended to be used with zip files from trusted sources. Directories bundled by the CDK CLI (by...
Read more >Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK.
Read more >aws-cdk/aws-s3-assets module - AWS Documentation
When deploying a CDK app that includes constructs with assets, the CDK toolkit will first upload all the assets to S3, and only...
Read more >Your first AWS CDK app - AWS Documentation
Create the app · Build the app · List the stacks in the app · Add an Amazon S3 bucket · Synthesize an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@iliapolo Thanks for the tip. I have cleaned up the bootstrap bucket and it works now. I’m closing the issue.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.