0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AWS Macieの機密データ検出結果用のリポジトリ設定でエラーになった時

Posted at

AWSのコンソールでMacieの設定を行なって、「30日以内に、検出結果保存用のBucketを設定して下さい」と促され、ウィザードに沿って作業を行なったものの、最後の最後で

putClassificationExportConfiguration: The operation can't be performed because you're not authorized to access the S3 bucket, the KMS key, or both.

のエラーになり、困惑したものの無事解決しました

公式にも下のように案内があるのですが、

Amazon Macie の「putClassificationExportConfiguration」エラーを解決するにはどうすればよいですか?

指定したKMSキーのポリシーの任意の箇所に下を追加すればエラーにならず、設定出来ました

policy.json
{
            "Sid": "Allow Macie to use the key",
            "Effect": "Allow",
            "Principal": {
                "Service": "macie.amazonaws.com"
            },
            "Action": [
                "kms:GenerateDataKey",
                "kms:Encrypt"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "aws:SourceAccount": "[AWSアカウントID]"
                },
                "ArnLike": {
                    "aws:SourceArn": [
                        "arn:aws:macie2:[リージョン]:[AWSアカウントID]:export-configuration:*",
                        "arn:aws:macie2:[リージョン]:[AWSアカウントID]:classification-job/*"
                    ]
                }
            }
        }
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?