Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (17 sloc) 2.74 KB

Running Automation Workflows with Triggers using CloudWatch Events

You can start an Automation workflow by specifying an Automation document as the target of an Amazon CloudWatch event. You can start workflows according to a schedule, or when a specific AWS system event occurs. For example, let's say you create an Automation document named BootStrapInstances that installs software on an instance when an instance starts. To specify the BootStrapInstances document (and corresponding workflow) as a target of a CloudWatch event, you first create a new CloudWatch Events rule. (Here's an example rule: Service name: EC2, Event Type: EC2 Instance State-change Notification, Specific state(s): running, Any instance.) Then you use the following procedure to specify the BootStrapInstances document as the target of the event. When a new instance starts, the system runs the workflow and installs software.

For information about creating Automation documents, see Working with Automation Documents.

Use the following procedure to configure an Automation workflow as the target of a CloudWatch event.

To configure Automation as a target of a CloudWatch event

  1. Sign in to the AWS Management Console and open the CloudWatch console at

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

  3. Choose Event Pattern or Schedule. Event Pattern lets you build a rule that generates events for specific actions in AWS services. Schedule lets you build a rule that generates events according to a schedule that you specify by using the cron format.

  4. Choose the remaining options for the rule you want to create, and then choose Add target.

  5. In the Select target type list, choose SSM Automation.

  6. In the Document list, choose an Automation document to run when your target is invoked.

  7. Expand Configure document version, and choose a version. $DEFAULT was explicitly set as the default document version in Systems Manager. You can choose a specific version, or use the latest version.

  8. Expand Configure automation parameter(s), and either keep the default parameter values (if available) or enter your own values. Note
    Required parameters have an asterisk (*) next to the parameter name. To create a target, you must specify a value for each required parameter. If you don't, the system creates the rule, but it won't run.

  9. In the permissions section, choose an option. CloudWatch uses the role to start the Automation workflow.

  10. Choose Configure details and complete the wizard.

You can’t perform that action at this time.