-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
@aws-cdk/aws-eventsRelated to CloudWatch EventsRelated to CloudWatch Eventseffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1
Description
Hello,
It seems that we can't target an SSM Run Command with Events > class Rule (construct) :
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.IRuleTarget.html
It's not obtainable from Ssm :
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.RuleTargetConfig.html
Use Case
I want to create scheduled Events Rule to Target an SSM RunCommand to call a Document, for example, to RunShellScript on my target(s) identified with Tags.
Proposed Solution
Be able to configure SSM Run Command in Events.Rule, Yaml example :
TargetsProperties:
- Arn: "arn:aws:ssm:{{environment_config.region}}::document/AWS-RunShellScript"
Id: "1"
Input: "{
\"commands\":[ echo "Hello World" ]
}"
RoleArn: !stack_output ecs-host-cloudwatch-events-iam-role::RoleArn
RunCommandParametersProperties:
- Key: tag:UpdateECSAgent
Values:
- "true"
Other
Done without pb & successfully with events.CfnRule.
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
christopheche, john-tipper, ajbdev, nicklaw5, pr8kerl and 16 morerrhodes
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-eventsRelated to CloudWatch EventsRelated to CloudWatch Eventseffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1