0

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

1 Answer 1

2

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.

2
  • If container is being launched on demand then I'm assuming it will register a new SQS with SNS.. How would it delete the queue when container is being stopped by ECS?
    – Gary
    Apr 29, 2017 at 0:18
  • You have to create SQS queues manually, but any number of containers/instances/applications can queue or retrieve messages. If you want SQS to work with SNS then again you have to set it up manually. Deleting queues is manual, but if you don't use them for something like two weeks (from memory) they delete themselves automatically.
    – Tim
    Apr 29, 2017 at 0:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .