翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
Amazon Keyspaces で CDC ストリームを操作するためのアクセス許可を設定する
CDC ストリームを有効にするには、IAM ユーザーやロールなどのプリンシパルに次のアクセス許可が必要です。
詳細については AWS Identity and Access Management、「」を参照してくださいAWS Identity and Access Management Amazon Keyspaces 用。
テーブルの CDC ストリームを有効にするアクセス許可
Amazon Keyspaces テーブルの CDC ストリームを有効にするには、プリンシパルにまずテーブルを作成するアクセス許可が必要であり、次にサービスにリンクされたロール AWSServiceRoleForAmazonKeyspacesCDC を作成するアクセス許可が必要です。Amazon Keyspaces は、サービスにリンクされたロールを使用して、ユーザーに代わって CloudWatch メトリクスをアカウントに発行します。
次の IAM ポリシーがその例です。
{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ // Enable CDC stream during table creation "cassandra:Create", "cassandra:CreateMultiRegionResource", // Enable CDC stream after creation "cassandra:Alter", "cassandra:AlterMultiRegionResource" ], "Resource":[ "arn:aws:cassandra:
aws-region
:555555555555:/keyspace/my_keyspace
/*", "arn:aws:cassandra:aws-region
:555555555555:/keyspace/system*" ] }, { "Sid": "KeyspacesCDCServiceLinkedRole", "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "arn:aws:iam::*:role/aws-service-role/cassandra-streams.amazonaws.com/AWSServiceRoleForAmazonKeyspacesCDC", "Condition": { "StringLike": { "iam:AWSServiceName": "cassandra-streams.amazonaws.com" } } } ] }
ストリームを無効にするには、ALTER TABLE
アクセス許可のみが必要です。
CDC ストリームを表示するアクセス許可
CDC ストリームを表示または一覧表示するには、プリンシパルにシステムキースペースの読み取りアクセス許可が必要です。詳細については、「system_schema_mcs」を参照してください。
次の IAM ポリシーがその例です。
{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":"cassandra:Select", "Resource":[ "arn:aws:cassandra:
aws-region
:111122223333:/keyspace/system*" ] } ] }
または Amazon Keyspaces API を使用して CDC ストリームを表示 AWS CLI または一覧表示するには、プリンシパルにアクション cassandra:ListStreams
および のアクセス許可が必要ですcassandra:GetStream
。
次の IAM ポリシーがその例です。
{ "Effect": "Allow", "Action": [ "cassandra:Select", "cassandra:ListStreams", "cassandra:GetStream" ], "Resource": "*" }
CDC ストリームを読み取るアクセス許可
CDC ストリームを読み取るには、プリンシパルに次のアクセス許可が必要です。
{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "cassandra:GetStream", "cassandra:GetShardIterator", "cassandra:GetRecords" ], "Resource":[ // CDC Stream ARN "arn:aws:cassandra:
aws-region
:111122223333:/keyspace/my_keyspace
/table/my_table
/stream/stream_label
" ] } ] }
Kinesis Client Library (KCL) を使用して Amazon Keyspaces CDC ストリームを処理するアクセス許可
KCL で Amazon Keyspaces CDC ストリームを処理するには、IAM プリンシパルに次のアクセス許可が必要です。
Amazon Keyspaces
– 指定された Amazon Keyspaces CDC ストリームへの読み取り専用アクセス。DynamoDB
– KCL ストリーム処理に必要なshard lease
テーブルの作成、テーブルへの読み取りおよび書き込みアクセス、インデックスへの読み取りアクセスを行うためのアクセス許可。CloudWatch
– KCL を使用した Amazon Keyspaces CDC ストリーム処理から CloudWatch アカウントの KCL クライアントアプリケーションの名前空間にメトリクスデータを発行するアクセス許可。モニタリングの詳細については、Amazon CloudWatch で Kinesis Client Library をモニタリングする」を参照してください。
{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "cassandra:GetStream", "cassandra:GetShardIterator", "cassandra:GetRecords" ], "Resource":[ "arn:aws:cassandra:
aws-region
:111122223333:/keyspace/my_keyspace
/table/my_table
/stream/stream_label
" ] }, { "Effect":"Allow", "Action":[ "dynamodb:CreateTable", "dynamodb:DescribeTable", "dynamodb:UpdateTable", "dynamodb:GetItem", "dynamodb:UpdateItem", "dynamodb:PutItem", "dynamodb:DeleteItem", "dynamodb:Scan" ], "Resource":[ "arn:aws:dynamodb:aws-region
:111122223333:table/KCL_APPLICATION_NAME
" ] }, { "Effect":"Allow", "Action":[ "dynamodb:CreateTable", "dynamodb:DescribeTable", "dynamodb:GetItem", "dynamodb:UpdateItem", "dynamodb:PutItem", "dynamodb:DeleteItem", "dynamodb:Scan" ], "Resource":[ "arn:aws:dynamodb:aws-region
:111122223333:table/KCL_APPLICATION_NAME
-WorkerMetricStats", "arn:aws:dynamodb:aws-region
:111122223333:table/KCL_APPLICATION_NAME
-CoordinatorState" ] }, { "Effect":"Allow", "Action":[ "dynamodb:Query" ], "Resource":[ "arn:aws:dynamodb:aws-region
:111122223333:table/KCL_APPLICATION_NAME
/index/*" ] }, { "Effect":"Allow", "Action":[ "cloudwatch:PutMetricData" ], "Resource":"*" } ] }