Connection module for Amazon SNS


This module accepts explicit sns credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:

If IAM roles are not used you need to specify them either in a pillar or in the minion's config file:

sns.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

sns.region: us-east-1

If a region is not specified, the default is us-east-1.

It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:

    key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
    region: us-east-1


salt.modules.boto_sns.create(name, region=None, key=None, keyid=None, profile=None)

Create an SNS topic.

CLI example to create a topic:

salt myminion boto_sns.create mytopic region=us-east-1
salt.modules.boto_sns.delete(name, region=None, key=None, keyid=None, profile=None)

Delete an SNS topic.

CLI example to delete a topic:

salt myminion boto_sns.delete mytopic region=us-east-1
salt.modules.boto_sns.exists(name, region=None, key=None, keyid=None, profile=None)

Check to see if an SNS topic exists.

CLI Example:

salt myminion boto_sns.exists mytopic region=us-east-1
salt.modules.boto_sns.get_all_subscriptions_by_topic(name, region=None, key=None, keyid=None, profile=None)

Get list of all subscriptions to a specific topic.

CLI example to delete a topic:

salt myminion boto_sns.get_all_subscriptions_by_topic mytopic region=us-east-1
salt.modules.boto_sns.get_all_topics(region=None, key=None, keyid=None, profile=None)

Returns a list of the all topics..

CLI Example:

salt myminion boto_sns.get_all_topics
salt.modules.boto_sns.get_arn(name, region=None, key=None, keyid=None, profile=None)

Returns the full ARN for a given topic name.

CLI Example:

salt myminion boto_sns.get_arn mytopic
salt.modules.boto_sns.subscribe(topic, protocol, endpoint, region=None, key=None, keyid=None, profile=None)

Subscribe to a Topic.

CLI example to delete a topic:

salt myminion boto_sns.subscribe mytopic https region=us-east-1
salt.modules.boto_sns.unsubscribe(topic, subscription_arn, region=None, key=None, keyid=None, profile=None)

Unsubscribe a specific SubscriptionArn of a topic.

CLI Example:

salt myminion boto_sns.unsubscribe my_topic my_subscription_arn region=us-east-1

New in version 2016.11.0.