Masstransit: AWS SQS/SNS setup questions

Created on 10 Jul 2020  路  4Comments  路  Source: MassTransit/MassTransit

Hi,

As far as I understood MassTransit will create SQS and SNS queues and topics itself (that's why we have to have IAM role setup to allow this).

Questions:

  1. Is it possible that I create and control SQS and SNS outside of MS and configure it just to use the existing infrastructure? (as opposed to MS creating necessary queues and topics). Basically I want devops to be responsible for AWS infrastructure.
  2. If I needed more control over SQS/SNS configurations (like I must support encryption etc.) - how would I do it? Is this supported?

Thanks!

Most helpful comment

@phatboyg, we are running into the same issue. In our environment - the applications are not allowed to create any aws resources. The thought is inline with AWS's least privilege.
It obviously makes sense to ensure that the queues and topics are created before the bus starts; we could start with checking if the topic/queue exists - and if it does - no need to create it; if it doesn't - the the app creates it.
In controlled environment like ours - if the queues and topics do not exists, the service will fail (because the queue creation failed) - which is a fine as the we are required to create the queues and topics beforehand.

All 4 comments

MassTransit requires permissions to create topics and queues, without it, the bus will likely fail to start or fail in ways that will be hard to diagnose later during program execution.

Thanks for your reply!

Could you give a quick hint about other questions I've had there? I could not find anything related in the documentation, but it's really crucial for me (specifically about enabling encryption etc.). I would really appreciate!

Thanks.

Well, I feel like I answered the first one, the answer is no.

The second one, for each topic and queue, you can specify both attributes and tags as part of the configuration. There are some methods that will set the attributes as well, for certain known attributes.

To define attributes on a topic, you鈥檇 use the publish topology, whereas for a queue when configuring the receive endpoint.

@phatboyg, we are running into the same issue. In our environment - the applications are not allowed to create any aws resources. The thought is inline with AWS's least privilege.
It obviously makes sense to ensure that the queues and topics are created before the bus starts; we could start with checking if the topic/queue exists - and if it does - no need to create it; if it doesn't - the the app creates it.
In controlled environment like ours - if the queues and topics do not exists, the service will fail (because the queue creation failed) - which is a fine as the we are required to create the queues and topics beforehand.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghd258 picture ghd258  路  6Comments

phatboyg picture phatboyg  路  6Comments

ffMathy picture ffMathy  路  3Comments

icsharp picture icsharp  路  4Comments

mtherien picture mtherien  路  8Comments