LambdaConfigurationProperty Struct
Describes the AWS Lambda functions to invoke and the events for which to invoke them.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const lambdaConfigurationProperty: s3.CfnBucket.LambdaConfigurationProperty = {
event: 'event',
function: 'function',
// the properties below are optional
filter: {
s3Key: {
rules: [{
name: 'name',
value: 'value',
}],
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3
lambda_configuration_property = s3.CfnBucket.LambdaConfigurationProperty(
event="event",
function="function",
# the properties below are optional
filter=s3.CfnBucket.NotificationFilterProperty(
s3_key=s3.CfnBucket.S3KeyFilterProperty(
rules=[s3.CfnBucket.FilterRuleProperty(
name="name",
value="value"
)]
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;
LambdaConfigurationProperty lambdaConfigurationProperty = LambdaConfigurationProperty.builder()
.event("event")
.function("function")
// the properties below are optional
.filter(NotificationFilterProperty.builder()
.s3Key(S3KeyFilterProperty.builder()
.rules(List.of(FilterRuleProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
var lambdaConfigurationProperty = new LambdaConfigurationProperty {
Event = "event",
Function = "function",
// the properties below are optional
Filter = new NotificationFilterProperty {
S3Key = new S3KeyFilterProperty {
Rules = new [] { new FilterRuleProperty {
Name = "name",
Value = "value"
} }
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
lambdaConfigurationProperty := &LambdaConfigurationProperty{
Event: jsii.String("event"),
Function: jsii.String("function"),
// the properties below are optional
Filter: &NotificationFilterProperty{
S3Key: &S3KeyFilterProperty{
Rules: []interface{}{
&FilterRuleProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
},
}
Properties
The Amazon S3 bucket event for which to invoke the AWS Lambda function.
For more information, see Supported Event Types in the Amazon S3 User Guide .
filteroptionalIResolvable | CfnBucket.filteroptionaltyping.Union[IResolvable, NotificationFilterProperty]filteroptionalIResolvableFilteroptionalIResolvableFilteroptionalinterface{} #The filtering rules that determine which objects invoke the AWS Lambda function.
For example, you can create a filter so that only image files with a .jpg extension invoke the function when they are added to the Amazon S3 bucket.
The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.