0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

別アカウントにAuroraをクローンさせたい

Posted at

概要

他のアカウントのユーザーに CMK の使用を許可する に基本的にかいてあるが、オプショナルな記述が混ざっていてわかりにくかったのでまとめる。

状況

移行元A 111122223333

  • RDS Aurora
    • DB クラスター設定から、移行先BのAWSアカウントID 444455556666 を入力
  • KMS CMK
    • CMKポリシー :arrow_forward: 後述

移行先B 444455556666

  • Resource Access Manager
    • 承認するだけ
  • IAM
    • IAMポリシー :arrow_forward: 後述

移行元A: CMKポリシー

ここに移行先BのAWSアカウントID 444455556666 を入力。

これだけでOK。アクセス制限は移行先BのIAMポリシーでやる。

移行先B: IAMポリシー

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:Encrypt",
                "kms:Decrypt",
                "kms:ReEncrypt*",
                "kms:GenerateDataKey*",
                "kms:DescribeKey",
                "kms:CreateGrant",
                "kms:ListGrants",
                "kms:RevokeGrant"
            ],
            "Resource": "arn:aws:kms:ap-northeast-1:111122223333:key/キー"
        }
    ]
}

Auroraの暗号化キーとして使うには、CreateGrant なども必要だった。
厳密には、もっと削れると思う。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?