NotificationKeyFilter
- class aws_cdk.aws_s3.NotificationKeyFilter(*, prefix=None, suffix=None)
Bases:
object- Parameters:
prefix (
Optional[str]) – S3 keys must have the specified prefix.suffix (
Optional[str]) – S3 keys must have the specified suffix.
- ExampleMetadata:
infused
Example:
# my_lambda: lambda.Function bucket = s3.Bucket(self, "MyBucket") filter = s3.NotificationKeyFilter(prefix="home/myusername/*") bucket.add_event_notification(s3.EventType.OBJECT_CREATED, s3n.LambdaDestination(my_lambda), filter)
Attributes
- prefix
S3 keys must have the specified prefix.
- suffix
S3 keys must have the specified suffix.