Configuring EventBridge for Systems Manager events - AWS Systems Manager

Configuring EventBridge for Systems Manager events

You can use Amazon EventBridge to perform a target event when supported AWS Systems Manager status changes, state changes, or other conditions occur. You can create a rule that runs whenever there is a state or status transition, or when there is a transition to one or more states that are of interest.

The following procedure provides general steps for creating an EventBridge rule that engages when a specified event is emitted by Systems Manager. For a list of procedures in this user guide that address specific scenarios, see Related content at the end of this topic.

Note

When an AWS service in your account emits an event, it always goes to your account’s default event bus. To write a rule that responds to events from AWS services in your account, you must associate it with the default event bus. You can create a rule on a custom event bus that looks for events from AWS services, but this rule will engage only when you receive such an event from another account via cross-account event delivery. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

To configure EventBridge for Systems Manager events

  1. Open the Amazon EventBridge console at https://console.aws.amazon.com/events/.

  2. In the navigation pane, choose Rules, and then choose Create rule.

    -or-

    If the Amazon EventBridge home page opens first, choose Create rule.

  3. Enter a name and description for the rule.

    A rule can't have the same name as another rule in the same AWS Region and on the same event bus.

  4. For Define pattern, choose Event pattern.

  5. Choose Pre-defined pattern by service.

  6. For Service provider, choose AWS.

  7. For Service name, choose EC2 Simple Systems Manager (SSM).

  8. For Event type, do one of the following:

    • Choose All Events.

      If you choose All Events, all events emitted by Systems Manager will match the rule. Be aware that this option can result in a very large number of event target actions.

    • Choose the type of Systems Manager event to use for this rule. EventBridge currently supports events from the following Systems Manager capabilities:

      • Configuration Compliance

      • Inventory

      • Maintenance Windows

      • Parameter Store

      • Run Command

      • State Manager

      Note

      For Systems Manager actions that aren't supported by EventBridge, you can choose AWS API Call via CloudTrail to create an event rule that is based on an API call, which are recorded by AWS CloudTrail. For an example, see Monitoring session activity using Amazon EventBridge (console) .

    (Optional) If you want to customize the event pattern, choose Edit next to Event pattern, make your changes, and choose Save.

  9. If you chose a Systems Manager capability in step 8, do one of the following:

  10. If you chose a Systems Manager capability in step 8, choose whether to invoke targets for all or only certain detail types, statuses, or other supported options. The available options depend on the capability you have selected.

  11. For Select event bus, choose the event bus that you want to associate with this rule. If you want this rule to respond to matching events that come from your own AWS account, select AWS default event bus. When an AWS service in your account emits an event, it always goes to your account’s default event bus.

  12. For Select targets, choose the AWS service that is to act when an event of the selected type is detected.

  13. In the other fields in this section, enter information specific to this target type, if any is needed.

  14. For many target types, EventBridge needs permissions to send events to the target. In these cases, EventBridge can create the AWS Identity and Access Management (IAM) role needed for your rule to run:

    • To create an IAM role automatically, choose Create a new role for this specific resource.

    • To use an IAM role that you created earlier, choose Use existing role.

  15. Optionally, choose Add target to add another target for this rule.

  16. (Optional) Enter one or more tags for the rule. For more information, see Tagging Your Amazon EventBridge Resources in the Amazon EventBridge User Guide.

  17. Choose Create.