mapbox / cloudfriend

Helper functions for assembling CloudFormation templates in JavaScript
ISC License
69 stars 9 forks source link

Shortcut to create a queue subscribed to an arbitrary SNS topic #77

Closed davidtheclark closed 5 years ago

davidtheclark commented 5 years ago

The existing queue shortcut creates an SNS topic and subscribes to it. I'd like to create a queue and subscribe to an existing topic, instead. I don't think this needs to be another shortcut: we could modify the existing shortcut so you can pass in a TopicArn instead of TopicName, and the shortcut would subscribe your queue to that topic, instead of a new one.

I think we'd have to create an AWS::SNS::Subscription resource in order to subscribe the queue to an existing topic — and I don't know of any downsides to that. We could replace the current subscription method with that, regardless of whether you create a new topic or use an existing one.

cc @mapbox/accounts-billing