AWS 允许用户调用 create-role

Men*_*her 6 amazon-web-services

尝试创建角色http://docs.aws.amazon.com/vm-import/latest/userguide/import-vm-image.html 时,我遇到了以下错误(AccessDenied) when calling the CreateRole operation: User: arn:aws:iam::806409516843:user/<username> is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::806409516843:role/vmimport

我曾尝试阅读文档并在该主题上进行多次谷歌搜索,但似乎无法找到允许我的用户创建角色的方法。请帮忙。

小智 9

如果您对您的账户具有 root 访问权限,您只需编写自己的策略并将其附加到用户(AWS 控制台 => IAM => 用户 => 添加内联策略)。下面是一个例子:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1482712489000",
            "Effect": "Allow",
            "Action": [
                "iam:CreateRole"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

  • @Cyber​​Geek.exe,如果你有时间,你能发布替代解决方案吗? (4认同)