あめがえるのITブログ

頑張りすぎない。ほどほどに頑張るブログ。

AWS IAM PolicyのPowerUserについて調べてみた

IAM PowerUserってなにもなのか気になって夜しか眠れなくなったので調べてみた。

IAM Policy PowerUser

AWSでは、IAMポリシーとして標準で利用できる"PowerUserAccess"がある。IAMとOrganizationsの管理機能に対する権限は付与しない。

PowerUserとAdministratorの違い

ざっくりいうとアカウント系の操作ができるかどうか。

PowerUserAccess IAM Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "NotAction": [
                "iam:*",
                "organizations:*",
                "account:*"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:CreateServiceLinkedRole",
                "iam:DeleteServiceLinkedRole",
                "iam:ListRoles",
                "organizations:DescribeOrganization",
                "account:ListRegions",
                "account:GetAccountInformation"
            ],
            "Resource": "*"
        }
    ]
}

※NotActionは記載以外は許可となるため、iam・organizations・accountの一部が拒否され、記載にないEC2などのActionはすべて許可される。

AdministratorAccess IAM Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "*",
            "Resource": "*"
        }
    ]
}




感想

NotActionの認識を間違えていたので勉強になつた。(∩´∀`)∩