Bucket queue notifications
Create an S3 bucket and subscribe to its events with an SQS queue.
const queue = new sst.aws.Queue("MyQueue");queue.subscribe("subscriber.handler");
const bucket = new sst.aws.Bucket("MyBucket");bucket.notify({ notifications: [ { name: "MySubscriber", queue, events: ["s3:ObjectCreated:*"], }, ],});import type { SQSEvent } from "aws-lambda";
export const handler = async (event: SQSEvent) => { console.log(event); return "ok";};View the full example.