I've found it's a useful strategy to create relevant queues whenever a queue worker service boots. For instance, on service boot, it checks whether its queues exist already in AWS and creates them if they don't.
Something I'm struggling with now is how to ensure that an SNS subscription for the queue exists. Checking whether the queue exists and creating it if not is easy, subscribing a queue to a particular SNS topic on boot is also easy - but I can't seem to find a sensible way of checking whether a particular queue is already subscribed to a topic!
If it helps, this will be using the Ruby SDK - but I think that the clients across the languages are pretty much all the same. If I can find a sensible way with the cli client it will most likely be available in the ruby sdk.
The only thing I've come up with so far is to list all the subscriptions and then filter them, but this seems a really silly way of doing it as there could be tonnes of subscriptions - I'd rather not have to deal with paging responses on worker boot.
It would be great if there were a way to retrieve whether a subscription is active, based on parameters of the queue ARN and the topic ARN.