Using kms:GetKeyRotationStatus on AWS managed key(ex aws/acm), AWS doesn't grant access to this API call to anyone, including the account owner. Is that correct?

0

I'm testing Java AP with KMS API. When I do kms:GetKeyRotationStatus on AWS managed key "aws/acm", It will fail no matter what permissions are set.

AccessDeniedException is displayed. <User: arn:aws:iam::xxxxxxxx:user/zzzz is not authorized to perform: kms:GetKeyRotationStatus on resource: arn:aws:kms:ap-northeast-1:xxxxxxxxxx:key/xxxxxxxxxxxxxxxxxx because no resource-based policy allows the kms:GetKeyRotationStatus action>

So, Although the documentation doesn't explain it, using kms:GetKeyRotationStatus on AWS managed key(ex aws/acm), AWS doesn't grant access to this API call to anyone, including the account owner. Is that correct?

  • I have the exactly same problem, also with aws/acm. The below answer doesn't help me.

1回答
0

Hi, I was able to get the KeyRotationStatus on a aws-managed kms key.

Make sure that the user/role used by the JAVA AP is in the same region as the KMS managed key, and that it really has enough permissions. You should then be able to run the following:

$aws kms list-keys                                                                                                                                                                                                       
{
    "Keys": [
        {
            "KeyId": "e1xxxxx-e6xx-45xx-xxxx-xxxxxxxxxxxxx",
            "KeyArn": "arn:aws:kms:us-west-2:000000000000:key/e1xxxxx-e6xx-45xx-xxxx-xxxxxxxxxxxxx"
        }
    ]
}

followed by

$ aws kms get-key-rotation-status --key-id e1xxxxx-e6xx-45xx-xxxx-xxxxxxxxxxxxx                                                                                                                                           
{
    "KeyRotationEnabled": true
}

That key id belongs to an aws-managed KMS key (aws/sns)

Hope this helps.

回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ