Search code examples
amazon-ecsaws-code-deployaws-event-bridgeawsdeploy

Amazon ECS service deployment state change events is not created nor sent to event bridge


When i deploy ecs service none of the Amazon ECS service deployment state change events are called event bridge does not receive any events for this rule: { "source": [ "aws.ecs" ], "detail-type": [ "ECS Deployment State Change" ] } furthermore no deployment event is shown in service events tab on aws website and no deployment event can be fetched from the cli (describe-service command) My fargate services use blue green deployment, i use default event bus

I deployed several services but events were not generated


Solution

  • I think that is because you are using AWS CodeDeploy as the ECS deployment controller, instead of AWS ECS. You would need to listen to CodeDeploy events instead of ECS deployment events. I'm having trouble finding the actual documentation on this, but I believe the event pattern would need to look like this:

    {
      "source": ["aws.codedeploy"],
      "detail-type": ["CodeDeploy Deployment State-change Notification"],
    }
    

    Here is the only documentation I can find on this.