You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a way to specify the folder that contains the handler.ts, instead of the path to the handler.ts, so when bundling the lambda it packages all the contents of the container folder
Or add a new property where we can pass a list of extra files to include when packaging the lambda.
Use case
I want to use handlebars in a lambda, so I need to bundle a template.hbs file along with the code.
The defineFunction has an entry property which is The path to the file that contains the function entry point.
when I build the lambda, if I download the code, the code only contains:
index.mjs
index.mjs.map
the template.hbs file is not there
If I use the cdk like this:
import * as lambda from "aws-cdk-lib/aws-lambda";
import { Runtime } from "aws-cdk-lib/aws-lambda";
const emailHandler = new lambda.Function(customResourceStack, "EmailHandler", {
runtime: Runtime.NODEJS_20_X,
code: lambda.Code.fromAsset("./amplify/my-lambda"),
handler: "handler.handler",
});
it adds all of my code inlcuding the template.hbs
would there be a way do the same with the defineFunction?, I don't wanna rely on the new lambda.Function because then I wouldn't be able to provide the secret() in the env configuration
The text was updated successfully, but these errors were encountered:
Environment information
Describe the feature
Add a way to specify the folder that contains the handler.ts, instead of the path to the handler.ts, so when bundling the lambda it packages all the contents of the container folder
Or add a new property where we can pass a list of extra files to include when packaging the lambda.
Use case
I want to use handlebars in a lambda, so I need to bundle a
template.hbs
file along with the code.The
defineFunction
has anentry
property which is The path to the file that contains the function entry point.My project structure looks like this :
when I build the lambda, if I download the code, the code only contains:
the
template.hbs
file is not thereIf I use the cdk like this:
it adds all of my code inlcuding the template.hbs
would there be a way do the same with the
defineFunction
?, I don't wanna rely on thenew lambda.Function
because then I wouldn't be able to provide thesecret()
in the env configurationThe text was updated successfully, but these errors were encountered: