Replies: 2 comments 2 replies
-
It doesn't appear to me that this is supported in CloudFormation. You might want to open an issue in the CloudFormation coverage roadmap for this, as the docs only mention this is for the console as far as I can tell |
Beta Was this translation helpful? Give feedback.
0 replies
-
Try using your own bind method for // cdk imports
import { Rule } from 'aws-cdk-lib/aws-events'
import { CfnDocument } from 'aws-cdk-lib/aws-ssm'
// method content
const automation = new CfnDocument(stack, 'MyAutomation', {
name: 'MyAutomation',
documentType: 'Automation',
updateMethod: 'NewVersion',
content: {}, // your automation content here
})
const rule = new Rule(stack, 'MyRule', {
ruleName: 'MyRule',
eventPattern: {}, // your event pattern here
})
const accountId = '123456789012' // replace with your account id
const region = 'us-east-1' // replace with your region
rule.addTarget({
bind: () => ({
arn: `arn:aws:ssm:${region}:${accountId}:automation-definition/${automation.name}`,
targetResource: automation,
// your rule props here (role, input, etc...)
}),
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
is it possible to add SSM Automation as Target to an Event Rule with CDK?
Beta Was this translation helpful? Give feedback.
All reactions