Amazon云平台 - 修复目标组错误
具体实现方法需要根据具体情况来定,以下是一个可能的示例:
打开Amazon Elastic Load Balancing控制台。
选择目标组(Target Groups)选项卡,找到错误的目标组。
选择该目标组并点击'编辑”(Edit)按钮。
在编辑页面,检查目标组配置是否正确。如果有错误,进行修正。
点击'保存”(Save)按钮保存修改。
如果错误还未解决,可以考虑重新创建目标组,并将新的目标组添加到负载均衡器(Load Balancer)中。
例如,以下是使用AWS CLI修复目标组错误的方法:
aws elbv2 describe-target-groups --names my-target-group
替换'my-target-group”为要修复的目标组名称。
"TargetGroupArn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/my-target-group/67890abcdef90123"
aws elbv2 delete-target-group --target-group-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/my-target-group/67890abcdef90123
替换ARN为您找到的目标组ARN。
aws elbv2 create-target-group --name my-target-group --protocol HTTP --port 80 --health-check-protocol HTTP --health-check-path /health --vpc-id vpc-12345678
aws elbv2 register-targets --target-group-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup