为AWS IAM用户提供查看屏幕截图的能力

时间:2017-02-24 17:43:22

标签: amazon-web-services

如何让AWS IAM用户能够使用GetConsoleScreenshot操作?

我想出了一个我认为应该这样做的政策:

 {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ec2:GetConsoleScreenshot",
                "ec2:DescribeImages",
                "ec2:DescribeInstances",
                "ec2:AvailabilityZone",
                "ec2:EbsOptimized",
                "ec2:InstanceProfile",
                "ec2:InstanceType",
                "ec2:PlacementGroup",
                "ec2:Region",
                "ec2:ResourceTag/tag-key",
                "ec2:RootDeviceType",
                "ec2:Tenancy"   
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}

我使用此作为参考:Granting IAM Users Required Permissions for Amazon EC2 Resources

我想知道的是,如果给某人一个过度的话,那就是" ec2:GetConsoleScreenshot",才能?提供这种能力是否隐含了其他权限?

1 个答案:

答案 0 :(得分:1)

您的IAM政策看起来不错。授予用户ec2:GetConsoleScreenshot权限并不过分,因为这需要调用the GetConsoleScreenshot API。授予用户/角色此权限不会暗示其他权限。 IAM策略中的所有操作都是原子操作,并不意味着允许子操作。