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.

질문됨 2년 전421회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠