SqsDestination Class
Use an SQS queue as a bucket notification destination.
Example
csharp
// Install: dotnet add package Amazon.CDK.Lib
Queue myQueue;
var bucket = new Bucket(this, "MyBucket", new BucketProps {
NotificationsSkipDestinationValidation = true
});
bucket.AddEventNotification(EventType.OBJECT_REMOVED, new SqsDestination(myQueue));
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var myQueue Queue
bucket := s3.NewBucket(this, jsii.String("MyBucket"), &BucketProps{
NotificationsSkipDestinationValidation: jsii.Boolean(true),
})
bucket.AddEventNotification(s3.EventType_OBJECT_REMOVED, s3n.NewSqsDestination(myQueue))
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#Allows using SQS queues as destinations for bucket notifications.
Use bucket.onEvent(event, queue) to subscribe.