Interface EdgeFunctionProps
- All Superinterfaces:
EventInvokeConfigOptions,FunctionOptions,FunctionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EdgeFunctionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:00.643Z")
@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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEdgeFunctionPropsstatic final classAn implementation forEdgeFunctionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic EdgeFunctionProps.Builderbuilder()default StringThe stack ID of Lambda@Edge function.Methods inherited from interface software.amazon.awscdk.services.lambda.EventInvokeConfigOptions
getMaxEventAge, getOnFailure, getOnSuccess, getRetryAttemptsMethods inherited from interface software.amazon.awscdk.services.lambda.FunctionOptions
getAdotInstrumentation, getAllowAllIpv6Outbound, getAllowAllOutbound, getAllowPublicSubnet, getApplicationLogLevel, getApplicationLogLevelV2, getArchitecture, getCodeSigningConfig, getCurrentVersionOptions, getDeadLetterQueue, getDeadLetterQueueEnabled, getDeadLetterTopic, getDescription, getEnvironment, getEnvironmentEncryption, getEphemeralStorageSize, getEvents, getFilesystem, getFunctionName, getInitialPolicy, getInsightsVersion, getIpv6AllowedForDualStack, getLayers, getLogFormat, getLoggingFormat, getLogGroup, getLogRemovalPolicy, getLogRetention, getLogRetentionRetryOptions, getLogRetentionRole, getMemorySize, getParamsAndSecrets, getProfiling, getProfilingGroup, getRecursiveLoop, getReservedConcurrentExecutions, getRole, getRuntimeManagementMode, getSecurityGroups, getSnapStart, getSystemLogLevel, getSystemLogLevelV2, getTimeout, getTracing, getVpc, getVpcSubnetsMethods inherited from interface software.amazon.awscdk.services.lambda.FunctionProps
getCode, getHandler, getRuntimeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStackId
The stack ID of Lambda@Edge function.Default: - `edge-lambda-stack-${region}`
-
builder
- Returns:
- a
EdgeFunctionProps.BuilderofEdgeFunctionProps
-