SnsDestination

class aws_cdk.aws_s3_notifications.SnsDestination(topic)

Bases: object

Use an SNS topic as a bucket notification destination.

ExampleMetadata:

infused

Example:

bucket = s3.Bucket(self, "MyBucket")
topic = sns.Topic(self, "MyTopic")
bucket.add_event_notification(s3.EventType.OBJECT_CREATED, s3n.SnsDestination(topic))
Parameters:

topic (ITopic) –

Methods

bind(_scope, bucket)

Registers this resource to receive notifications for the specified bucket.

This method will only be called once for each destination/bucket pair and the result will be cached, so there is no need to implement idempotency in each destination.

Parameters:
Return type:

BucketNotificationDestinationConfig