Reputation: 29
I am setting up AWS KMS. I have done encryption and decryption but I am trying to create an asymmetric key with an IAM User. This user should be only create keys so I am creating a new user. I have tried AWSKeyManagementServicePowerUser
and the policy shown below.
However, can't create -- it says access denied.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole",
"kms:PutKeyPolicy",
"kms:CreateAlias"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"kms:CreateAlias",
"kms:CreateKey",
"kms:DeleteAlias",
"kms:Describe*",
"kms:GenerateRandom",
"kms:Get*",
"kms:List*",
"kms:TagResource",
"kms:UntagResource",
"kms:ListAliases",
"iam:ListGroups",
"iam:ListRoles",
"iam:ListUsers",
"kms:CreateKey",
"iam:ListUsers",
"tag:GetResources"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole",
"kms:PutKeyPolicy",
"kms:CreateAlias"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"kms:CreateAlias",
"kms:CreateKey",
"kms:DeleteAlias",
"kms:Describe*",
"kms:GenerateRandom",
"kms:Get*",
"kms:List*",
"kms:TagResource",
"kms:UntagResource",
"iam:ListGroups",
"iam:ListRoles",
"iam:ListUsers",
"kms:CreateKey",
"iam:ListUsers"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole",
"kms:PutKeyPolicy",
"kms:CreateAlias"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"kms:CreateAlias",
"kms:CreateKey",
"kms:DeleteAlias",
"kms:Describe*",
"kms:GenerateRandom",
"kms:Get*",
"kms:List*",
"kms:TagResource",
"kms:UntagResource",
"iam:ListGroups",
"iam:ListRoles",
"iam:ListUsers",
"kms:CreateKey",
"iam:ListUsers"
],
"Resource": "*"
}
]
}
I have tried this json files. Please help me.
Upvotes: 0
Views: 221