I have this EventBridge rule pattern to capture events from CodeDeploy, which works for the most generic cases:
{
"source": ["aws.codedeploy"],
"detail-type": ["CodeDeploy Deployment State-change Notification"],
"detail": {
"state": ["SUCCEEDED", "FAILED", "IN_PROGRESS"],
}
My issue is it gets triggered regardless of what initiated the event (e.g. Auto Scaling group action, CodeDeploy update outdated instances, User action, etc.)
Is there a way to add a filter to only capture the event when the deployment is initiated by User action (e.g. CLI)?