AWS SDK for Ruby
Developer Guide

Creating an Amazon SNS Topic

The following example creates the topic MyGroovyTopic in the us-west-2 region and displays the resulting topic ARN.

require 'aws-sdk-sns' # v2: require 'aws-sdk' sns = Aws::SNS::Resource.new(region: 'us-west-2') topic = sns.create_topic(name: 'MyGroovyTopic') puts topic.arn