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_queue: sqs.Queue

bucket = s3.Bucket(self, "MyBucket")
bucket.add_event_notification(s3.EventType.OBJECT_REMOVED,
    s3n.SqsDestination(my_queue), prefix="foo/", suffix=".jpg")

Attributes

prefix

S3 keys must have the specified prefix.

Return type

Optional[str]

suffix

S3 keys must have the specified suffix.

Return type

Optional[str]