aws-cdk-lib.aws_s3_notifications.SqsDestination

class SqsDestination

LanguageType name
.NETAmazon.CDK.AWS.S3.Notifications.SqsDestination
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3notifications#SqsDestination
Javasoftware.amazon.awscdk.services.s3.notifications.SqsDestination
Pythonaws_cdk.aws_s3_notifications.SqsDestination
TypeScript (source)aws-cdk-lib » aws_s3_notifications » SqsDestination

Implements IBucketNotificationDestination

Use an SQS queue as a bucket notification destination.

Example

declare const myQueue: sqs.Queue;
const bucket = new s3.Bucket(this, 'MyBucket');
bucket.addEventNotification(s3.EventType.OBJECT_REMOVED, new s3n.SqsDestination(myQueue), {
  prefix: 'foo/',
  suffix: '.jpg',
});

Initializer

new SqsDestination(queue: IQueue)

Parameters

  • queue IQueue

Methods

NameDescription
bind(_scope, bucket)Allows using SQS queues as destinations for bucket notifications.

bind(_scope, bucket)

public bind(_scope: Construct, bucket: IBucket): BucketNotificationDestinationConfig

Parameters

  • _scope Construct
  • bucket IBucket

Returns

  • BucketNotificationDestinationConfig

Allows using SQS queues as destinations for bucket notifications.

Use bucket.onEvent(event, queue) to subscribe.