我已经实现了 AWS Eventbridge 规则和 Lambda 函数的基本组合作为其目标。该规则假设基于所有 AWS AutoScaling 事件创建一个事件并调用 Lambda。这在为现有 ASG 触发缩放操作时效果很好,但在创建具有相同前缀的新 ASG 时,规则没有反应。旧 ASG 名称:test-asg-lc-123 新 ASG 名称:test-asg-lc-124
甚至可以使用通配符吗?
"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"
]
}