AWS ECS Task deployment failed alert using Amazon EventBridge — Part 2 (Terraform code)

Akhil Ghatiki
Oct 25, 2022

Please read Part 1 for more context before you continue with this blog post

The part -1 talks about event pattern rule to filter events of a task failure. In this blog post, lets take a look at the terraform code for this implementation

This blog post assumes you are quite familiar with the Terraform and you have some hands on experience with it.

The above snippet creates the event rule as per the pattern we discussed in Part -1.

And you can create the target to this event rule as below.

Now, you can have your lambda triggered for the events coming from the SNS and the lambda can alert the teams (any communication medium that you use)

--

--

Akhil Ghatiki

Developer at ThoughtWorks. Sometimes ENTP-T and sometimes ESTP-A not sure which one.Loves to talk about tech, code, data privacy, environment.