pulumi-awsx icon indicating copy to clipboard operation
pulumi-awsx copied to clipboard

Integrate with Lambda Builders

Open corymhall opened this issue 9 months ago • 0 comments

The lambda-builders library has CLI with a JSON-RPC interface. “Given a folder containing function's source code, the selected build action, and path to an artifacts folder, this library will produce built artifacts in the artifacts folder.”

https://github.com/aws/aws-lambda-builders/blob/develop/DESIGN.md#builders-library

This would allow us to provide a component library where you could do something like this


const testLambda = new aws.lambda.Function("test_lambda", {
    code: new lambda_builders.Nodejs("../path/to/package.json"), // uses lambda-builders 
    name: "lambda_function_name",
    role: iamForLambda.arn,
    handler: "index.test",
    runtime: "nodejs18.x",
 });

Figuring out how to bundle a Lambda function (regardless of programming language) is a task that every single developer has to figure out. Most of the time there is really only one way to do it, but each developer has to figure it out for themselves. This would make it super easy, and would give another example where working with Pulumi for serverless use cases is so much easier than other tools.

corymhall avatar Apr 26 '24 18:04 corymhall