SnsDestination Class
Use an SNS topic as a bucket notification destination.
Example
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
bucket := s3.NewBucket(this, jsii.String("MyBucket"))
topic := sns.NewTopic(this, jsii.String("MyTopic"))
bucket.AddEventNotification(s3.EventType_OBJECT_CREATED, s3n.NewSnsDestination(topic))
Initializer
Methods
bind(scope: Construct, bucket: IBucketRef): BucketNotificationDestinationConfigdef bind(self, scope: Construct, bucket: IBucketRef) -> BucketNotificationDestinationConfigpublic BucketNotificationDestinationConfig bind(Construct scope, IBucketRef bucket)public BucketNotificationDestinationConfig Bind(Construct scope, IBucketRef bucket)func Bind(Scope Construct, Bucket IBucketRef) BucketNotificationDestinationConfig#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.