The following code is working as expected.But,It did not work when I replaced the revision number 2 with wild card * since I want work for current revision number which can be any number. "arn:aws:ecs:us-east-1:********:task-definition/test-definition-task:"
Can anyone suggest the better approach so that it will work for the current revision?
{
"detail-type": [
"ECS Task State Change"
],
"source": [
"aws.ecs"
],
"detail": {
"taskDefinitionArn": [
"arn:aws:ecs:us-east-1:*********:task-definition/test-definition-task:2"
],
"stoppedReason": [
"Essential container in task exited"
],
"lastStatus": [
"STOPPED"
]
}
}