Tutorial: Set AWS Systems Manager automation as an EventBridge target - Amazon EventBridge

Tutorial: Set AWS Systems Manager automation as an EventBridge target

You can use EventBridge to invoke AWS Systems Manager Automation on a regular timed schedule or when specific events are detected. This tutorial assumes that you're invoking Systems Manager Automation based on specific events.

Step 1: Create a Rule

Create a rule to invoke Systems Manager Automation.

To create the EventBridge rule

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

  2. In the navigation pane, choose Rules.

  3. Choose Create rule.

  4. Enter a name and description for the rule.

  5. For Define pattern, do the following:

    1. Choose Event pattern

    2. Choose Pre-defined pattern by service.

    3. For Service provider, choose AWS.

    4. For Service Name and Event type, choose the service and event type. Depending on the service and event type that you choose, you might need to specify additional options.

  6. For Select event bus, choose AWS default event bus. When an AWS service in your account emits an event, it goes to your account’s default event bus.

  7. For Target, choose SSM Automation.

  8. For Document, choose the Systems Manager document to run.

  9. (Optional) To specify a version of the document, choose Configure document version.

  10. Under Configure automation parameter(s), choose No Parameter(s) or Constant.

    If you choose Constant, specify the constants to pass to the document execution.

  11. Do one of the following:

    • To create an IAM role automatically, choose Create a new role for this specific resourceEventBridge creates the IAM role needed for your event to run.

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

  12. Choose Create.

Step 2: Confirm success

If you see the rule in the list of rules, you've successfully created the rule.

Step 3: Clean up your resources

You can now delete the resources that you created for this tutorial, unless you want to retain them. By deleting AWS resources that you are no longer using, you prevent unnecessary charges to your AWS account.

To delete the EventBridge rule(s)

  1. Open the Rules page of the EventBridge console.

  2. Select the rule(s) that you created.

  3. Choose Delete.

  4. Choose Delete.