Skip to content

ListSubscriptionsByTopic

Source: src/AWS/SNS/ListSubscriptionsByTopic.ts

Runtime binding for sns:ListSubscriptionsByTopic.

Bind this operation to a Topic inside a function runtime to page through that topic’s subscriptions; the TopicArn is injected automatically. The binding grants the host function sns:ListSubscriptionsByTopic on the topic. Provide the ListSubscriptionsByTopicHttp layer on the Function to implement the binding.

// init (provide SNS.ListSubscriptionsByTopicHttp on the Function)
const listSubscriptionsByTopic = yield* SNS.ListSubscriptionsByTopic(topic);
// runtime
const response = yield* listSubscriptionsByTopic();
const endpoints = (response.Subscriptions ?? []).map((s) => s.Endpoint);