aws-cdk-lib.aws_s3.CfnBucket.LambdaConfigurationProperty

interface LambdaConfigurationProperty

LanguageType name
.NETAmazon.CDK.AWS.S3.CfnBucket.LambdaConfigurationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3#CfnBucket_LambdaConfigurationProperty
Javasoftware.amazon.awscdk.services.s3.CfnBucket.LambdaConfigurationProperty
Pythonaws_cdk.aws_s3.CfnBucket.LambdaConfigurationProperty
TypeScript aws-cdk-lib » aws_s3 » CfnBucket » LambdaConfigurationProperty

Describes the AWS Lambda functions to invoke and the events for which to invoke them.

Example

// 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',
      }],
    },
  },
};

Properties

NameTypeDescription
eventstringThe Amazon S3 bucket event for which to invoke the AWS Lambda function.
functionstringThe Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.
filter?IResolvable | NotificationFilterPropertyThe filtering rules that determine which objects invoke the AWS Lambda function.

event

Type: string

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 .


function

Type: string

The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.


filter?

Type: IResolvable | NotificationFilterProperty (optional)

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.