Skip to content
v2.273.0

NotificationKeyFilter Struct ​

Example ​

ts
   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 ​

prefixstringprefixstrprefixStringPrefixstringPrefix*string#
S3 keys must have the specified prefix.
suffixstringsuffixstrsuffixStringSuffixstringSuffix*string#
S3 keys must have the specified suffix.