How to Set Up Alerts for ECS State Changes in Slack?

June 4, 2025 4 answers
Asked by 23!LetsBegin
I'm looking to set up alerts for state changes in my AWS ECS cluster and want to push those alerts to Slack. I'm considering using EventBridge paired with a Lambda function. Does anyone have suggestions for the best approach or alternatives?

Answers

plankton lab
Nope, I'm only interested in container state changes like start, stop, and restart.
Reply to this answer
lockstep+2
You can definitely set up SNS to create a topic, then use an EventBridge rule to filter for your ECS events, which would trigger a Lambda function from the SNS topic. I haven't tried this myself, but it seems like an interesting approach. Just keep in mind the cost for each alert and whether itโ€™s necessary to include SNS in your setup.

plankton lab: What's the purpose of adding SNS? EventBridge can deliver directly to Lambda, right? It doesn't seem like you need SNS or SQS for this scenario.

Reply to this answer
tangent table
Your plan sounds good! Using EventBridge with Lambda is an effective way to catch ECS state changes and send notifications to Slack. Alternatively, you could use EventBridge to send alerts to SNS, which then triggers an HTTPS webhook directly to Slack. This method can be simpler if you donโ€™t need to customize the alert formatting. If you do want to format the alerts, sticking with Lambda is the way to go.

_plankton count: Great, really helpful!

Reply to this answer
frozen custard fan
What specific state changes are you looking for in your ECS cluster? Are these related to resources or config changes?
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions