我正在尝试参考以下指南为EC2实例设置Reboot Action。 https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html#AddingRebootActions
警报正常运行,并向给定的SNS主题发送电子邮件,但是,重新启动操作失败。 以下是我看到的错误。
Failed to execute action arn:aws:swf:us-east-1:xxxxxxxxxx:action/actions/AWS_EC2.InstanceId.Reboot/1.0. Received error:
{
"actionState": "Failed",
"stateUpdateTimestamp": 1571814054523,
"notificationResource": "arn:aws:swf:us-east-1:xxxxxxxxxx:action/actions/AWS_EC2.InstanceId.Reboot/1.0",
"publishedMessage": null,
"error": null
}
“我的服务”角色已设置所有必需的权限。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeAlarms",
"ec2:DescribeInstanceStatus",
"ec2:DescribeInstances",
"ec2:DescribeSnapshots",
"ec2:DescribeVolumeStatus",
"ec2:DescribeVolumes",
"ec2:RebootInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"ec2:CreateSnapshot"
],
"Resource": "*"
}
]
}
答案 0 :(得分:0)
Failed to execute action arn:aws:swf:us-east-1:xxxxxxxxxx:action/actions/AWS_EC2.InstanceId.Terminate/1.0. Received error: ""
可能是由于在警报定义中使用无效的 InstanceId 引起的。