I'm having trouble understanding why a Cloudwatch event rule is not firing. I've followed this related question and did the following.
- Created a Cloudtrail which sends events to a Cloudwatch log
Created the following CloudWatch event rule:
{ "detail-type": [ "AWS write API Call via CloudTrail" ], "source": [ "aws.ecr" ], "detail": { "eventSource": [ "ecr.amazonaws.com" ], "eventName": [ "PutImage" ] } }
- Created a lambda to be invoked by this rule.
I can verify that in my Cloudwatch log group (set up to accept events from Cloudtrail) I am seeing the PutImage event. However, the lambda never fires and the rule metrics show that it is never triggered. I am assuming at this point the rule must be faulty (I would expect to see the rule triggered even if the lambda is faulty) but I can't see what additional logic is required. Is it necessary to link my event to a particular log group?