Lambda Bundles
See original GitHub issuePR | Champion |
---|---|
# | @eladb |
Description
- NodeFunction, JavaFunction, PythonFunction, etc.
- Automatic publishing of environment variables
- Combine “grant” & publish (e.g.
bucket.grantXxx(lambda)
will also addBUCKET_ARN
environment variable)
Progress
- Tracking Issue Created
- RFC PR Created
- Core Team Member Assigned
- Initial Approval / Final Comment Period
- Ready For Implementation
- implementation issue 1
- Resolved
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Lambda deployment packages - AWS Documentation
Use a deployment package to deploy your Lambda function code. Lambda supports two types of deployment packages: container images and .zip file archives....
Read more >ryfeus/lambda-packs: Precompiled packages for ... - GitHub
AWS Lambda pack in Python for processing satellite imagery. Basically it enables to deploy python code in an easy and cheap way for...
Read more >AWS Lambda 101: Shave That Bundle Down
Smaller bundles will help you respect AWS quotas, allowing more functions in your AWS account! Resource, Quota. Lambda function deployment ...
Read more >5 Ways To Bundle a Lambda Function Within an AWS ...
This post explains how to bundle or include a Lambda function within a CDK construct if your function requires external dependencies.
Read more >How to bundle a nodejs lambda function? (using esbuild)
In this video we bundle a nodejs lambda function using lambda -build (powered by esbuild).
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
Hey @eladb, I’m sure you’ve seen https://github.com/aws/aws-cdk/pull/6535… I’ve been working further on this to come up with the best possible developer experience for JS/TS Lambda functions.
I have now a working construct offering the following API:
Code can be defined inside the construct and it can use any top level dependency imported in the file (another file or an external module). This offers a really great developer experience. I’m using the Typescript Compiler API to analyze the AST for this.
It ~can also easily support~ supports props like
externals
(= a list of module that should not be bundled likeaws-sdk
) andnatives
(= a list of modules that should be included/installed in thenode_modules
folder, can be done in a Lambda compatible docker image). The whole process could be dockerized.We can discuss this further when you’re available.
I tend to agree that synth is more inline with how we want CDK experience to work. Ideally we should offer some kind of an open framework for building assets inside docker images during synthesis.
The minimal surface can be something like "run this command inside a docker image with two mounted volumes:
/src
with the project source tree and/asset
is mounted to where the asset output should be emitted (could be a directory or a file).Then, we can implement our parcel bundler using something like this, and also perhaps implement an additional builder that leverages
sam build
.