Does SST provide an API to subscribe a queue to a topic?

Awesome API.

The subscription API allows us to hook a lambda to a topic. But I’d like to hook my queue to the topic, and then the lambda to the queue.

Do I need to use aws-cdk directly instead?

The answer is yes.

const queue = new sqs.Queue(this, "QueueName", {});
     
topic.addSubscription(new subscriptions.SqsSubscription(queue));
1 Like