Use AWS SNS to communicate between ECS Tasks

amazon-ecsamazon-web-services

I have an ECS Cluster which can scale some tasks in a service based on the load. I also have a scheduled audit ECS task which run periodically and wants to send a notification to these other tasks in the service so they can update their data set.

Can I use SNS to publish to a topic from the audit task and consume the notification in other tasks in the cluster? I'm able to publish to SNS but I don't see how notification would be received in other containers since subscriptions can only be http/email/sns/application/sqs etc.

The tasks are implemented in golang. I wanted to avoid adding a new message bus and am hoping aws has some framework for this.

Thanks

Best Answer

You can communicate between ECS containers using SNS.

Based on what little you've said you should consider Simple Queuing Service. If you need to send messages to multiple destinations it can be done with a combination of SNS and SQS.