Skip to content

Subscription

Source: src/AWS/SNS/Subscription.ts

An Amazon SNS subscription that attaches an endpoint to a topic.

Subscription keeps the lifecycle of the subscription itself separate from the topic, which lets Lambda event sources and manually managed subscriptions share the same canonical resource model.

const subscription = yield* Subscription("TopicSubscription", {
topicArn: topic.topicArn,
protocol: "lambda",
endpoint: fn.functionArn,
});