question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In v1.12.0 aws-s3-deployment references non-distributed file

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
jonathanmorleycommented, Oct 9, 2019

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)

3reactions
moravcikcommented, Oct 11, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found