Skip to content

Commit

Permalink
fix: support lambda props and env (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
thantos committed Oct 17, 2022
1 parent 9f00f26 commit 25bcf86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@functionless/aws-lambda/src/function.ts
Expand Up @@ -13,7 +13,7 @@ export interface LambdaFunction<F extends FunctionHandler = FunctionHandler> {

kind: typeof LambdaFunctionKind;
handler: F;
props: FunctionProps;
props?: FunctionProps;
}

export function isLambdaFunction<F extends FunctionHandler>(
Expand Down Expand Up @@ -96,7 +96,7 @@ export function LambdaFunction(
}

Object.assign(func, {
kind: "fl.Function",
kind: LambdaFunctionKind,
handler,
props,
resourceId,
Expand Down
2 changes: 2 additions & 0 deletions packages/@functionless/cli/src/synthesize.ts
Expand Up @@ -165,8 +165,10 @@ export async function synthesizeProject(project: Project): Promise<void> {
runtime: aws_lambda.Runtime.NODEJS_16_X,
handler: "index.default",
code: aws_lambda.Code.fromAsset(outFolder),
...file.resource.props,
environment: {
NODE_OPTIONS: "--enable-source-maps",
...file.resource.props?.environment,
},
});
func.addEnvironment("RESOURCE_ID", func.node.path);
Expand Down

0 comments on commit 25bcf86

Please sign in to comment.