8000
File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/serverless-components/nextjs-cdk-construct/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ export class NextJSLambdaEdge extends Construct {
151
151
this . defaultNextLambda = new lambda . Function ( this , "NextLambda" , {
152
152
functionName : toLambdaOption ( "defaultLambda" , props . name ) ,
153
153
description : `Default Lambda@Edge for Next CloudFront distribution` ,
154
- handler : "index.handler" ,
154
+ handler : props . handler || "index.handler" ,
155
155
currentVersionOptions : {
156
156
removalPolicy : RemovalPolicy . DESTROY // destroy old versions
157
157
} ,
Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ export interface Props extends StackProps {
63
63
imageCache ?: string ;
64
64
lambdaCache ?: string ;
65
65
} ;
66
+ /**
67
+ * If you use a custom handler with `.build()`, you can set the handler here.
68
+ */
69
+ handler ?: string ;
70
+
66
71
/**
67
72
* Enable logging on the cloudfront distribution
68
73
*/
You can’t perform that action at this time.
0 commit comments