AWS SDK for Ruby
Developer Guide

Getting Information about All Amazon SNS Topics

The following example lists the ARNs of your Amazon SNS topics in the us-west-2 region.

require 'aws-sdk-sns' # v2: require 'aws-sdk' sns = Aws::SNS::Resource.new(region: 'us-west-2') sns.topics.each do |topic| puts topic.arn end