SNS/SQS fanout with Terraform

Adrian Macal
Nov 6, 2020

--

With SNS you can easily publish an event and immediately deliver it to topic’s subscribers. With SQS you can decouple services and asynchronously process events. If you connect both services, you will get all benefits together.

Resources

Let’s create a SNS topic and two SQS queues.

Subscriptions

Everything should be connected.

Permissions

By default your topic cannot forward message to the queues. You need to add missing permissions to every queue as access policy.

--

--

Adrian Macal
Adrian Macal

Written by Adrian Macal

Software Developer, Data Engineer with solid knowledge of Business Intelligence. Passionate about programming.

Responses (1)