CloudWatch RUM 使用のための IAM ポリシー
CloudWatch RUM を完全に管理するには、IAM ポリシー AmazonCloudWatchRUMFullAccess を持つ、IAM ユーザーまたはロールとしてサインインする必要があります。さらに、他のポリシーやアクセス許可が必要になる場合もあります。
承認用の新しい Amazon Cognito ID プールを作成するアプリケーションモニターを作成するには、管理者の IAM ロール、または IAM ポリシー AdministratorAccess が必要です。
CloudWatch Logs にデータを送信するアプリケーションモニターを作成するには、以下のアクセス許可を持つ IAM ロールまたはポリシーにログオンする必要があります。
{ "Effect": "Allow", "Action": [ "logs:PutResourcePolicy" ], "Resource": [ "*" ] }
アプリモニターで JavaScript ソースマップを有効にするには、ソースマップファイルを Amazon S3 バケットにアップロードする必要があります。IAM ロールまたはポリシーには、Amazon S3 バケットの作成、バケットポリシーの設定、バケット内のファイルの管理を行う特定の Amazon S3 アクセス許可が必要です。セキュリティの理由から、これらのアクセス許可は特定のリソースに限定します。以下のポリシー例では、名前に
rum
を含むバケットへのアクセスを制限し、aws:ResourceAccount
条件キーを使用してプリンシパルアカウントのみにアクセス許可を制限します。{ "Sid": "AllowS3BucketCreationAndListing", "Effect": "Allow", "Action": [ "s3:CreateBucket", "s3:ListAllMyBuckets" ], "Resource": "arn:aws:s3:::*", "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }, { "Sid": "AllowS3BucketActions", "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:ListBucket" ], "Resource": "arn:aws:s3:::*rum*", "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }, { "Sid": "AllowS3BucketPolicyActions", "Effect": "Allow", "Action": [ "s3:PutBucketPolicy", "s3:GetBucketPolicy" ], "Resource": "arn:aws:s3:::*rum*", "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }, { "Sid": "AllowS3ObjectActions", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::*rum*", "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }
ソースマップバケットでサーバー側の暗号化に独自の AWS KMS キーを使用するには、IAM ロールまたはポリシーにキーの作成、キーポリシーの更新、Amazon S3 での AWS KMS キーの使用、Amazon S3 バケットの暗号化設定の設定を行う特定の AWS KMS アクセス許可が必要です。セキュリティの理由から、これらのアクセス許可は特定の目的に限定します。以下の例では、特定のリージョンと accountId のキーへのアクセスを制限し、上記の例と同様の S3 制限が適用されます。
{ "Sid": "AllowKMSKeyCreation", "Effect": "Allow", "Action": [ "kms:CreateKey", "kms:CreateAlias" ], "Resource": "*" }, { "Sid": "KMSReadPermissions", "Effect": "Allow", "Action": [ "kms:ListAliases" ], "Resource": "*" }, { "Sid": "AllowUpdatingKeyPolicy", "Effect": "Allow", "Action": [ "kms:PutKeyPolicy", "kms:GetKeyPolicy", "kms:ListKeyPolicies" ], "Resource": "arn:aws:kms:
REGION
:ACCOUNT_ID
:key/*" }, { "Sid": "AllowUseOfKMSKeyForS3", "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": "arn:aws:kms:REGION
:ACCOUNT_ID
:key/*" }, { "Sid": "AllowS3EncryptionConfiguration", "Effect": "Allow", "Action": [ "s3:PutEncryptionConfiguration", "s3:GetEncryptionConfiguration" ], "Resource": "arn:aws:s3:::*rum*", "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }
CloudWatch RUM データを表示する必要があるものの、CloudWatch RUM リソースの作成は行わない他のユーザーについては、AmazonCloudWatchRUMReadOnlyAccess ポリシーを使用できます。