我需要什么 AWS 角色策略才能运行 AWS CLI 命令

问题描述

每当我运行命令来获取 DeviceFarm 项目或安排运行时,我都会收到错误消息,指出我无权运行这些命令并且我的用户被明确拒绝。

我在角色设置中,找不到任何要添加的策略以使我能够运行这些命令。

我需要添加什么政策?

命令:aws devicefarm schedule-run <options>

错误User: arn:<user arn> is not authorized to perform: devicefarm:ScheduleRun on resource: <resource arn> with an explicit deny

解决方法

在你的命令之前加上 sudo。这将使您能够以提升的权限运行命令,并且您应该不会遇到您遇到的一些挑战。