Skip to content

Instantly share code, notes, and snippets.

@Kami
Created July 12, 2019 20:46
Show Gist options
  • Save Kami/204a8f676c0d1de39dc841b699054a68 to your computer and use it in GitHub Desktop.
Save Kami/204a8f676c0d1de39dc841b699054a68 to your computer and use it in GitHub Desktop.
---
name: "write_eventbridge_data_to_file"
pack: "default"
description: "Test rule which writes AWS EventBridge event data to file."
enabled: true
trigger:
type: "core.st2.webhook"
parameters:
url: "eventbridge"
criteria:
trigger.body.detail.eventSource:
pattern: "ec2.amazonaws.com"
type: "equals"
trigger.body.detail.eventName:
pattern: "RunInstances"
type: "equals"
action:
ref: "core.local"
parameters:
cmd: "echo \"{{trigger.body}}\" >> ~/st2.webhook.out"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment