Show / Hide Table of Contents

Interface IEdgeLambda

Represents a Lambda function version and event type when using Lambda@Edge.

Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IEdgeLambda
Syntax (vb)
Public Interface IEdgeLambda
Remarks

The type of the AddBehaviorOptions.edgeLambdas property.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;
using Amazon.CDK.AWS.Lambda;

Version version;

var edgeLambda = new EdgeLambda {
    EventType = LambdaEdgeEventType.ORIGIN_REQUEST,
    FunctionVersion = version,

    // the properties below are optional
    IncludeBody = false
};

Synopsis

Properties

EventType

The type of event in response to which should the function be invoked.

FunctionVersion

The version of the Lambda function that will be invoked.

IncludeBody

Allows a Lambda function to have read access to the body content.

Properties

EventType

The type of event in response to which should the function be invoked.

LambdaEdgeEventType EventType { get; }
Property Value

LambdaEdgeEventType

FunctionVersion

The version of the Lambda function that will be invoked.

IVersion FunctionVersion { get; }
Property Value

IVersion

Remarks

Note: it's not possible to use the '$LATEST' function version for Lambda@Edge!

IncludeBody

Allows a Lambda function to have read access to the body content.

virtual Nullable<bool> IncludeBody { get; }
Property Value

System.Nullable<System.Boolean>

Remarks

Only valid for "request" event types (ORIGIN_REQUEST or VIEWER_REQUEST). See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html

Default: false

Back to top Generated by DocFX