Skip to content

BucketQueueSubscriber

Reference doc for the `sst.aws.BucketQueueSubscriber` component.

The BucketQueueSubscriber component is internally used by the Bucket component to add subscriptions to your AWS S3 Bucket.

You’ll find this component returned by the subscribeQueue method of the Bucket component.


Constructor

new BucketQueueSubscriber(name, args, opts?)

Parameters

Properties

nodes

Type Object

The underlying resources this component creates.

nodes.notification

Type BucketNotification

The S3 Bucket notification.

nodes.policy

Type QueuePolicy

The SQS Queue policy.

Args

bucket

Type Input<Object>

The bucket to use.

bucket.arn

Type Input<string>

The ARN of the bucket.

bucket.name

Type Input<string>

The name of the bucket.

events?

Type Input<Input<s3:ObjectCreated:* | s3:ObjectCreated:Put | s3:ObjectCreated:Post | s3:ObjectCreated:Copy | s3:ObjectCreated:CompleteMultipartUpload | s3:ObjectRemoved:* | s3:ObjectRemoved:Delete | s3:ObjectRemoved:DeleteMarkerCreated | s3:ObjectRestore:* | s3:ObjectRestore:Post | s3:ObjectRestore:Completed | s3:ObjectRestore:Delete | s3:ReducedRedundancyLostObject | s3:Replication:* | s3:Replication:OperationFailedReplication | s3:Replication:OperationMissedThreshold | s3:Replication:OperationReplicatedAfterThreshold | s3:Replication:OperationNotTracked | s3:LifecycleExpiration:* | s3:LifecycleExpiration:Delete | s3:LifecycleExpiration:DeleteMarkerCreated | s3:LifecycleTransition | s3:IntelligentTiering | s3:ObjectTagging:* | s3:ObjectTagging:Put | s3:ObjectTagging:Delete | s3:ObjectAcl:Put>[]>

Default All S3 events

A list of S3 event types that’ll trigger the notification.

{
events: ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
}

filterPrefix?

Type Input<string>

An S3 object key prefix that will trigger the notification.

To filter for all the objects in the images/ folder.

{
filterPrefix: "images/"
}

filterSuffix?

Type Input<string>

An S3 object key suffix that will trigger the notification.

To filter for all the objects with the .jpg suffix.

{
filterSuffix: ".jpg"
}

queue

Type Input<string>

The ARN of the SQS Queue.

subscriberId

Type Input<string>

The subscriber ID.

transform?

Type Object

Transform how this notification creates its underlying resources.

transform.notification?

Type BucketNotificationArgs | (args: BucketNotificationArgs, opts: ComponentResourceOptions, name: string) => void

Transform the S3 Bucket Notification resource.