Skip to content
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

Reference setup #18

Merged
merged 1 commit into from
Aug 14, 2020
Merged

Reference setup #18

merged 1 commit into from
Aug 14, 2020

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Aug 14, 2020

No description provided.

@jogold
Copy link
Contributor Author

jogold commented Aug 14, 2020

@markusl looks like there's an issue with the Docker volume not correctly being mounted when running in the GitHub action

@markusl markusl merged commit afad57a into markusl:master Aug 14, 2020
@markusl
Copy link
Owner

markusl commented Aug 14, 2020

@jogold what would be the preferred config for a case where the Lambda function consists of multiple .ts files?

@jogold
Copy link
Contributor Author

jogold commented Aug 14, 2020

@jogold what would be the preferred config for a case where the Lambda function consists of multiple .ts files?

The construct will automatically bundle all your files and dependencies. You just point to the correct entry file (the one containing your handler) or name the file containing your handler with the construct's id as suffix (like I did here). In your handler's code can require/import from wherever you like.

@jogold jogold deleted the reference-setup branch August 14, 2020 12:56
@markusl
Copy link
Owner

markusl commented Aug 14, 2020

@jogold now, if I run the command npx projen && chmod 755 package.json && yarn install && yarn build on macOS I will receive an error:

 FAIL  test/index.test.ts (35.101 s)tory, stat '/asset-input/cdk-ecr-image-scan-handler/lambda-handler/handler.ts'
  ✕ Create EcrImageScanResultHandler (33799 ms)

  ● Create EcrImageScanResultHandler

    Failed to bundle asset testing-stack/ecr-scan-result-handler/handler/Code/Stage: Error: docker exited with status 1

Is there a configuration error or am I misusing the API somehow?

@jogold
Copy link
Contributor Author

jogold commented Aug 14, 2020

Looks like a problem with Docker on macOS. I'm in the process of finalizing a way out of Docker for aws-lambda-nodejs: see aws/aws-cdk#9632. It should work in your environment I think.

What I don't understand is that you didn't have any problems with v1.57.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants