

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# ステップ 2: Detective で必要な IAM アクセス許可をアカウントに追加する
<a name="iam-permissions"></a>

このトピックでは、IAM ID に追加する必要がある AWS Identity and Access Management (IAM) アクセス許可ポリシーの詳細について説明します。

Detective と Security Lake の統合を有効にするには、IAM ID に次の AWS Identity and Access Management (IAM) アクセス許可ポリシーをアタッチする必要があります。

以下のインラインポリシーをロールにアタッチします。独自の Amazon S3 バケットを使用して Athena クエリ結果を保存する場合は、`athena-results-bucket` を Amazon S3 バケット名に置き換えてください。Detective に Amazon S3 バケットを自動的に生成させて Athena クエリの結果を保存する場合は、IAM ポリシーから `S3ObjectPermissions` 全体を削除します。

このポリシーを IAM ID にアタッチするために必要なアクセス許可がない場合は、 AWS 管理者にお問い合わせください。必要なアクセス許可があっても問題が発生した場合は、IAM ユーザーガイドの[「アクセス拒否エラーメッセージのトラブルシューティング](https://docs.aws.amazon.com//IAM/latest/UserGuide/troubleshoot_access-denied.html)」を参照してください。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListAllMyBuckets"
            ],
            "Resource": "*"
        },
        {
            "Sid": "S3ObjectPermissions",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::{{amzn-s3-demo-bucket}}",
                "arn:aws:s3:::{{amzn-s3-demo-bucket}}/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "glue:GetDatabases",
                "glue:GetPartitions",
                "glue:GetTable",
                "glue:GetTables"
            ],
            "Resource": [
                "arn:aws:glue:*:{{123456789012}}:database/amazon_security_lake*",
                "arn:aws:glue:*:{{123456789012}}:table/amazon_security_lake*/amazon_security_lake*",
                "arn:aws:glue:*:{{123456789012}}:catalog"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "athena:BatchGetQueryExecution",
                "athena:GetQueryExecution",
                "athena:GetQueryResults",
                "athena:GetQueryRuntimeStatistics",
                "athena:GetWorkGroup",
                "athena:ListQueryExecutions",
                "athena:StartQueryExecution",
                "athena:StopQueryExecution",
                "lakeformation:GetDataAccess",
                "ram:ListResources"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "ssm:GetParametersByPath"
            ],
            "Resource": [
                "arn:aws:ssm:*:{{123456789012}}:parameter/Detective/SLI"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "cloudformation:GetTemplateSummary",
                "iam:ListRoles"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "organizations:ListDelegatedAdministrators"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "organizations:ServicePrincipal": [
                        "securitylake.amazonaws.com"
                    ]
                }
            }
        }
    ]
}
```

------