Lambda "build" assets
See original GitHub issueWe would like to leverage the aws-lambda-builders project (part of SAM CLI) in order to allow CDK users to build AWS Lambda bundles.
Requirement (API sketch):
new lambda.Function(this, 'MyFunction', {
code: lambda.Code.build('/path/to/lambda/handler'),
runtime: lambda.Runtime.Xxx,
handler: 'foo.bar'
});
Ideally, this is all the user should need to specify. The lambda.Code.build
class should be able to deduce most of the information needed in order to tell the toolkit to invoke aws-lambda-builders via it’s JSON RPC protocol when assets are prepared (similar to any other asset).
Notes:
- Installation experience: it might okay if users would have to manually install aws-lambda-builders through
pip install
. We should consider if the toolkit can do this automatically upon first use? - SAM CLI uses heuristics to determine various options. The CDK should be able to use similar heuristics.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:29
- Comments:16 (13 by maintainers)
Top Results From Across the Web
Assets - AWS Cloud Development Kit (AWS CDK) v2
You add assets through APIs that are exposed by specific AWS constructs. For example, when you define a lambda.Function construct, the code property...
Read more >Building, bundling, and deploying applications with the AWS ...
As of this writing, this works for two main types of assets: Docker ... In the context of the AWS CDK, when we...
Read more >Assets - CDK for Terraform
Asset constructs manage assets for resources that need them, such as template_file, S3 bucket objects, or Lambda function archive files.
Read more >Assets and Archives
The Pulumi SDK provides two classes for working with files: Asset and Archive. ... files) can be combined as part of building up...
Read more >AWS CDK - Fullstack Polyglot with Asset Bundling
We have a common interface used for building Lambda functions, miscellaneous assets, S3 websites, Docker images and anything else you may ...
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
I think at a minimum we should provide guidance on how to use the SAM build capabilities as a pre synthesis step in order to produce lambda bundle zip files that can later be referenced as file assets for Lambda code.
Hey guys, is there any progress on the issue for typescript version?