Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Commit 25bcf86

Browse files
authored
fix: support lambda props and env (#570)
1 parent 9f00f26 commit 25bcf86

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/@functionless/aws-lambda/src/function.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface LambdaFunction<F extends FunctionHandler = FunctionHandler> {
1313

1414
kind: typeof LambdaFunctionKind;
1515
handler: F;
16-
props: FunctionProps;
16+
props?: FunctionProps;
1717
}
1818

1919
export function isLambdaFunction<F extends FunctionHandler>(
@@ -96,7 +96,7 @@ export function LambdaFunction(
9696
}
9797

9898
Object.assign(func, {
99-
kind: "fl.Function",
99+
kind: LambdaFunctionKind,
100100
handler,
101101
props,
102102
resourceId,

packages/@functionless/cli/src/synthesize.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ export async function synthesizeProject(project: Project): Promise<void> {
165165
runtime: aws_lambda.Runtime.NODEJS_16_X,
166166
handler: "index.default",
167167
code: aws_lambda.Code.fromAsset(outFolder),
168+
...file.resource.props,
168169
environment: {
169170
NODE_OPTIONS: "--enable-source-maps",
171+
...file.resource.props?.environment,
170172
},
171173
});
172174
func.addEnvironment("RESOURCE_ID", func.node.path);

0 commit comments

Comments
 (0)