In v1.12.0 aws-s3-deployment references non-distributed file
See original GitHub issueThis change released in v1.12.0 references ./lambda/src
, however that directory is excluded from being included in the package distribution in the .gitignore file here.
Reproduction Steps
Create an s3 deployment with CDK as normal. The console should log something like:
Error Log
Error: ENOENT: no such file or directory, scandir '/home/vsts/work/1/dist/cdk/node_modules/@aws-cdk/aws-s3-deployment/lambda/src'
at Object.readdirSync (fs.js:790:3)
at calcSourceHash (/home/vsts/work/1/dist/cdk/node_modules/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts:151:25)
at new BucketDeployment (/home/vsts/work/1/dist/cdk/node_modules/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts:83:24)
at new WebosAppCdkStack (/home/vsts/work/1/cdk/lib/webos-app-cdk-stack.ts:111:5)
at Object.<anonymous> (/home/vsts/work/1/cdk/bin/webos-app-cdk.ts:57:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Subprocess exited with error 1
Environment
- CLI Version : 1.12.0
- Framework Version: 1.12.0
- OS : Ubuntu Linux
- Language : TypeScript
Other
Either include the source code directory or implement the hash check differently.
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:9 (4 by maintainers)
Top Results From Across the Web
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 >class BucketDeployment (construct) · AWS CDK
System-defined x-amz-website-redirect-location metadata to be set on all objects in the deployment. destinationBucket. Type: IBucket. The S3 bucket to sync the ...
Read more >Installing Python dependencies - AWS Documentation
A Python dependency is any package or distribution that is not included in the Apache Airflow base install for your Apache Airflow version...
Read more >AWS Foundational Security Best Practices controls
When a CloudFront distribution in your account is configured to point to a non-existent bucket, a malicious third party can create the referenced...
Read more >Amazon S3 REST API Introduction
Explains the Amazon S3 API operations, related request and response structures, and error codes to enable you to store data in the cloud....
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
Can we get a patch release cut please? It is very hard to use versions of CDK other than latest (which is currently broken by this)
This is currently a showstopper for us (or manually define all installed CDK packages with previous version in all CDK projects), a patch release would be much appreciated.