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

[aws-lambda] Make AssetCode.fromAsset accept and zip multiple files and directory patterns #9020

Closed
2 tasks
asterikx opened this issue Jul 11, 2020 · 1 comment
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@asterikx
Copy link
Contributor

asterikx commented Jul 11, 2020

Make lambda.AssetCode.fromAsset accept multiple files/directory patterns and transparently zip them.

Use Case

I have Lambda made up of a Go executable and multiple HTML templates that need to be zipped. But this also applies to any Lambda that needs to be ship with config or any other files.

Proposed Solution

Using variadic arguments (or arrays), we could specify multiple files/directories. The CDK would zip all matching files/folders transparently so that the user does not need to do this manually.

const code = new lambda.AssetCode(
  path.join(__dirname, './lambda/bin/sendemail'),
  path.join(__dirname, './mail/dist/*.html')
);
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@asterikx asterikx added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 11, 2020
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Jul 11, 2020
@nija-at
Copy link
Contributor

nija-at commented Jul 17, 2020

This is already being tracked here #984

@nija-at nija-at closed this as completed Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants