[英]AWS Fault Injection Simulator returning 'Not authorized to perform the required action.'
I am trying to use AWS FIS to stress CPU on an ubuntu VM thru ssm send command ( aws:ssm:send-command/AWSFIS-Run-CPU-Stress
).我正在尝试使用 AWS FIS 通过 ssm 发送命令 (
aws:ssm:send-command/AWSFIS-Run-CPU-Stress
) 对 ubuntu VM 上的 CPU 施加压力。
When I ssh to the VM and use 'top' command I see the CPU shooting up successfully from 0.3% to 99.9% but surprisingly the FIS experiment ends up in 'failed' state with a tag:'Not authorized to perform the required action'.当我 ssh 到 VM 并使用“top”命令时,我看到 CPU 成功地从 0.3% 上升到 99.9%,但令人惊讶的是,FIS 实验最终以“失败”state 结束,标签为:“未授权执行所需的操作” .
Since the cpu definitely increased and I even see COMMAND name 'stress-ng-cpu' against the 99.9% cpu entry, any idea why it is still saying 'not authorized' and ending up in failed status?由于 cpu 确实增加了,我什至在 99.9% 的 cpu 条目上看到了命令名称“stress-ng-cpu”,知道为什么它仍然说“未授权”并最终处于失败状态吗?
Thanks.谢谢。
It worked after I completely removed mine and applied the permissions as shown here: https://chaos-engineering.workshop.aws/en/030_basic_content/030_basic_experiment/10-permissions.html在我完全删除我的并应用如下所示的权限后它起作用了: https://chaos-engineering.workshop.aws/en/030_basic_content/030_basic_experiment/10-permissions.html
Posting this for the benefit of others who might run into similar issues.发布此内容是为了其他可能遇到类似问题的人的利益。
The issue was probably a missing permission in the role, most likely ssm:ListCommands
or ssm:CancelCommand
, which are required by the aws:ssm:send-command
action ( https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html#ssm-actions-reference )问题可能是角色缺少权限,很可能是
ssm:ListCommands
或ssm:CancelCommand
,这是aws:ssm:send-command
操作所必需的 ( https://docs.aws.amazon.com/fis/latest /userguide/fis-actions-reference.html#ssm-actions-reference )
If you only have ssm:SendCommand
permission, the action will be able to start (and inject the fault), but then it will fail either when checking the state of the running experiment, or when trying to stop the experiment.如果您只有
ssm:SendCommand
权限,该操作将能够启动(并注入错误),但是在检查正在运行的实验的 state 或尝试停止实验时,它将失败。
The FIS experiment will end up in failed state, but the SSM document will keep running until the provided duration is reached. FIS 实验将以失败 state 结束,但 SSM 文档将继续运行,直到达到提供的持续时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.