The ListTopics method is used to fetch upto 100 SNS topics at a time until a SNS topic with an TopicArn that matches topicName is found.
public async Task<Topic> FindTopicAsync(string topicName) { var nextToken = string.Empty; do { var response = await this.ListTopicsAsync(new ListTopicsRequest { NextToken = nextToken }).ConfigureAwait(false); var matchedTopic = response.Topics.FirstOrDefault(x => TopicNameMatcher(x.TopicArn, topicName)); if (matchedTopic != null) { return matchedTopic; } nextToken = response.NextToken; } while (!string.IsNullOrEmpty(nextToken)); return null; }