Skip to content

Instantly share code, notes, and snippets.

@trevorrowe
Created October 15, 2014 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorrowe/93c112eddc27182c9d96 to your computer and use it in GitHub Desktop.
Save trevorrowe/93c112eddc27182c9d96 to your computer and use it in GitHub Desktop.
Subscribing a queue to a topic
require 'aws-sdk-v1'
queue = AWS::SQS.new.queues['queue-arn']
topic = AWS::SNS.new.topics['topic-arn']
# this will modify the queue policy to allow the topic to send messages
topic.subscribe(queue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment