BucketNotification
Reference doc for the `sst.aws.BucketNotification` component.
The BucketNotification
component is internally used by the Bucket
component to
add bucket notifications to AWS S3 Bucket.
You’ll find this component returned by the notify
method of the Bucket
component.
Constructor
Parameters
-
name
string
-
args
Args
-
opts?
ComponentResourceOptions
Properties
nodes
Type Object
The underlying resources this component creates.
nodes.notification
Type BucketNotification
The notification resource that’s created.
nodes.functions
Type Output
<
Function
[]
>
The functions that will be notified.
Args
bucket
bucket.arn
Type Input
<
string
>
The ARN of the bucket.
bucket.name
Type Input
<
string
>
The name of the bucket.
notifications
Type Input
<
Input
<
Object
>
[]
>
A list of subscribers that’ll be notified when events happen in the bucket.
notifications[].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.
notifications[].filterPrefix?
Type Input
<
string
>
An S3 object key prefix that will trigger the notification.
To filter for all the objects in the images/
folder.
notifications[].filterSuffix?
Type Input
<
string
>
An S3 object key suffix that will trigger the notification.
To filter for all the objects with the .jpg
suffix.
notifications[].function?
Type Input
<
string
|
FunctionArgs
|
“arn:aws:lambda:${string}”
>
The function that’ll be notified.
Customize the subscriber function. The link
ensures the subscriber can access the bucket.
Or pass in the ARN of an existing Lambda function.
notifications[].name
Type Input
<
string
>
The name of the subscriber.
notifications[].queue?
Type Input
<
string
|
Queue
>
The queue that’ll be notified.
For example, let’s say you have a queue.
You can subscribe to this bucket with it.
Or pass in the ARN of an existing SQS queue.
notifications[].topic?
Type Input
<
string
|
SnsTopic
>
The topic that’ll be notified.
For example, let’s say you have a topic.
You can subscribe to this bucket with it.
Or pass in the ARN of an existing SNS topic.
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.