interface NotificationKeyFilter
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.S3.NotificationKeyFilter |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3#NotificationKeyFilter |
Java | software.amazon.awscdk.services.s3.NotificationKeyFilter |
Python | aws_cdk.aws_s3.NotificationKeyFilter |
TypeScript (source) | aws-cdk-lib » aws_s3 » NotificationKeyFilter |
Example
declare const myLambda: lambda.Function;
const bucket = new s3.Bucket(this, 'MyBucket');
const filter: s3.NotificationKeyFilter = { prefix: 'home/myusername/*' };
bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), filter);
Properties
| Name | Type | Description |
|---|---|---|
| prefix? | string | S3 keys must have the specified prefix. |
| suffix? | string | S3 keys must have the specified suffix. |
prefix?
Type:
string
(optional)
S3 keys must have the specified prefix.
suffix?
Type:
string
(optional)
S3 keys must have the specified suffix.

.NET
Go
Java
Python
TypeScript (