Interface EdgeFunctionProps

All Superinterfaces:
EventInvokeConfigOptions, FunctionOptions, FunctionProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EdgeFunctionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:07.004Z") @Stability(Stable) public interface EdgeFunctionProps extends software.amazon.jsii.JsiiSerializable, FunctionProps
Properties for creating a Lambda@Edge function.

Example:

 Bucket myBucket;
 // A Lambda@Edge function added to default behavior of a Distribution
 // and triggered on every request
 EdgeFunction myFunc = EdgeFunction.Builder.create(this, "MyFunction")
         .runtime(Runtime.NODEJS_LATEST)
         .handler("index.handler")
         .code(Code.fromAsset(join(__dirname, "lambda-handler")))
         .build();
 Distribution.Builder.create(this, "myDist")
         .defaultBehavior(BehaviorOptions.builder()
                 .origin(new S3Origin(myBucket))
                 .edgeLambdas(List.of(EdgeLambda.builder()
                         .functionVersion(myFunc.getCurrentVersion())
                         .eventType(LambdaEdgeEventType.VIEWER_REQUEST)
                         .build()))
                 .build())
         .build();