dropbear
dropbear

Reputation: 29

AWS EventBridge Rule triggering on SSM Parameter Store change not working

I have a seemingly easy problem that already has cost me hours of troubleshooting without finding any solution.

What I'm trying to to is simple: Create an EventBridge Rule that triggers on an SSM Parameter Store Parameter change.

I use the default EventBus. The AWS console (when manually clicking through the options) is suggesting this event pattern which seems easy enough:

{
  "source": ["aws.ssm"],
  "detail-type": ["Parameter Store Change"]
}

The problem is: It doesn't work. I tried adding, updating, deleting parameter store parameters but the rule never triggered (evident from the CloudWatch metrics)

What I already tried:

I tried creating the rule both with the GUI and CloudFormation with no observable difference in results.

I tried further specifying the event pattern to check if it required a parameter name in order to work. Still no triggers.

I tried creating parameters with different names (with or without leading /) but it made no difference.

I tried searching for any logs that EventBridge might create (no success).

I tried looking up the events that EventBridge records in the default EventBus. It doesn't seem possible to directly access the actual events to check how they look like. CloudTrail events are not the same events.

I checked the internet for people having similar problems but apparently I'm the only one.

Upvotes: 2

Views: 1062

Answers (1)

victorg
victorg

Reputation: 41

I got a similar need and it worked with this simple pattern :

{
  "detail-type": ["Parameter Store Change"],
  "source": ["aws.ssm"],
  "detail": {
    "operation": ["Create", "Update", "Delete"]
  }
}

Note that defining the rule is one thing, you also have to link it to a EventTarget that will be triggered by the rule.

You can also follow this page from the AWS documentation that shows how to create this rule in the console and how to connect it to SNS for notification purposes.

It's also possible to filter which parameter can trigger the rule by defining matching patterns, detailed in the AWS doc here

But be aware that it's not possible to use wildcards in EventRules, only in Event Buses, see the note here

Upvotes: 0

Related Questions