I have implemented a basic combination of an AWS Eventbridge rule and a Lambda function as its target. The rule is suppose to create an event based on all AWS AutoScaling events and invoke the Lambda. This works well when triggering a scaling action for an existing ASG, but when creating a new ASG with the same prefix the rule is not reacting. Old ASG name: test-asg-lc-123 New ASG name: test-asg-lc-124
Is it even possible to use a wildcard?
"detail": {
"AutoScalingGroupName": [
"test-asg-lc-*"
]
},
"detail-type": [
"EC2 Instance Launch Successful",
"EC2 Instance Terminate Successful",
"EC2 Instance Launch Unsuccessful",
"EC2 Instance Terminate Unsuccessful",
"EC2 Instance-launch Lifecycle Action",
"EC2 Instance-terminate Lifecycle Action",
"EC2 Auto Scaling Instance Refresh Checkpoint Reached"
],
"source": [
"aws.autoscaling"
]
}
aws events test-event-pattern
which allows you to verify that a pattern matches a given event. "The matching is exact (character-by-character), without case-folding or any other string normalization." docs.aws.amazon.com/AmazonCloudWatch/latest/events/… – luk2302