DynamoDB の Amazon Redshift とのゼロ ETL 統合 - Amazon DynamoDB

DynamoDB の Amazon Redshift とのゼロ ETL 統合

Amazon DynamoDB と Amazon Redshift のゼロ ETL 統合により、コーディングなしで DynamoDB のデータのシームレスな分析が可能になります。この完全マネージド型の機能により、DynamoDB テーブルが自動的に Amazon Redshift データベースにレプリケートされるため、複雑な ETL プロセスを設定することなく、DynamoDB のデータに対して SQL クエリや分析を実行することができます。統合は、DynamoDB テーブルから Amazon Redshift データベースにデータをレプリケートすることで機能します。

統合を設定するには、ソースとして DynamoDB テーブル、ターゲットとして Amazon Redshift データベースを指定するだけです。有効化すると、この統合機能は DynamoDB テーブル全体を Amazon Redshift データベースにエクスポートします。この初期プロセスが完了するまでにかかる時間は、DynamoDB テーブルのサイズによって異なります。ゼロ ETL 統合により、その後は DynamoDB から Amazon Redshift への更新が、DynamoDB の増分エクスポートを使用して15 ~ 30 分ごとに段階的にレプリケートされます。つまり、Amazon Redshift にレプリケートされる DynamoDB データは、自動的に最新に保たれます。

設定が完了すると、ユーザーは標準的な SQL クライアントやツールを使用して Amazon Redshift 内の DynamoDB データを分析できるようになります。DynamoDB テーブルのパフォーマンスに影響を与えることはありません。このゼロ ETL 統合により煩雑な ETL プロセスを排除し、Amazon Redshift の分析機能や機械学習機能を活用して、DynamoDB から迅速かつ簡単にインサイトを引き出すことができます。

DynamoDB の Amazon Redshift とのゼロ ETL 統合を作成する前の前提条件

  1. 統合を作成する前に、ソースの DynamoDB テーブルとターゲットの Amazon Redshift クラスターを作成しておく必要があります。この情報は、 ステップ 1: ソース DynamoDB テーブルを設定する および ステップ 2: Amazon Redshift データウェアハウスを作成する で説明されています。

  2. Amazon DynamoDB と Amazon Redshift 間のゼロ ETL 統合を使用するには、ソースとなる DynamoDB テーブルでポイントインタイムリカバリ(PITR)が有効になっている必要があります。

  3. リソースベースのポリシーについて、DynamoDB テーブルと Amazon Redshift データウェアハウスが同じアカウント内にある場合、統合の作成ステップで Fix it for me オプションを使用すると、DynamoDB と Amazon Redshift の両方に必要なリソースポリシーを自動的に適用できます。異なる AWS アカウントにある DynamoDB テーブルと Amazon Redshift データウェアハウスの統合を作成する場合、Amazon Redshift データウェアハウスに以下のリソースポリシーを適用する必要があります。

    { "Version": "2012-10-17", "Statement": [ { "Sid": "Statement that allows redshift service to DescribeTable and ExportTable", "Effect": "Allow", "Principal": { "Service": "redshift.amazonaws.com" }, "Action": [ "dynamodb:ExportTableToPointInTime", "dynamodb:DescribeTable" ], "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "<account>" }, "ArnEquals": { "aws:SourceArn": "arn:aws:redshift:<region>:<account>:integration:*" } } }, { "Sid": "Statement that allows redshift service to see all exports performed on the table", "Effect": "Allow", "Principal": { "Service": "redshift.amazonaws.com" }, "Action": "dynamodb:DescribeExport", "Resource": "arn:aws:dynamodb:<region>:<account>:table/<table-name>/export/*", "Condition": { "StringEquals": { "aws:SourceAccount": "<account>" }, "ArnEquals": { "aws:SourceArn": "arn:aws:redshift:<region>:<account>:integration:*" } } } ] }
  4. アイデンティティベースのポリシー
    1. 統合を作成するユーザーには、GetResourcePolicyPutResourcePolicy および UpdateContinuousBackups のアクションを許可するアイデンティティベースのポリシーが必要です。

      注記

      以下の例では、リソースベースを arn:aws:redshift{-serverless} として示します。これは、名前空間が Amazon Redshift クラスターであるか、Amazon Redshift Serverless の名前空間であるかに応じて、arn が arn:aws:redshift または arn:aws:redshift-serverless になることを示す例です。

      { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:ListTables" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "dynamodb:GetResourcePolicy", "dynamodb:PutResourcePolicy", "dynamodb:UpdateContinuousBackups" ], "Resource": [ "arn:aws:dynamodb:<region>:<account>:table/<table-name>" ] }, { "Sid": "AllowRedshiftDescribeIntegration", "Effect": "Allow", "Action": [ "redshift:DescribeIntegrations" ], "Resource": "*" }, { "Sid": "AllowRedshiftCreateIntegration", "Effect": "Allow", "Action": "redshift:CreateIntegration", "Resource": "arn:aws:redshift:<region>:<account>:integration:*" }, { "Sid": "AllowRedshiftModifyDeleteIntegration", "Effect": "Allow", "Action": [ "redshift:ModifyIntegration", "redshift:DeleteIntegration" ], "Resource": "arn:aws:redshift:<region>:<account>:integration:<uuid>" }, { "Sid": "AllowRedshiftCreateInboundIntegration", "Effect": "Allow", "Action": "redshift:CreateInboundIntegration", "Resource": // The Amazon Resource Name (arn) for a Redshift provisioned cluster and a Redshift Serverless namespace have different formats. // Choose the one that applies to you: "arn:aws:redshift:<region>:<account>:namespace:<uuid>" "arn:aws:redshift-serverless:<region>:<account>:namespace/<uuid>" } ] }
    2. 送信先 Amazon Redshift 名前空間の設定を担当するユーザーには、PutResourcePolicyDeleteResourcePolicy および GetResourcePolicy のアクションを許可するアイデンティティベースのポリシーが必要です。

      { "Statement": [ # This statement authorizes the user to change, view or remove resource policies on a specific namespace { "Effect": "Allow", "Action": [ "redshift:PutResourcePolicy", "redshift:DeleteResourcePolicy", "redshift:GetResourcePolicy" ], "Resource": [ "arn:aws:redshift{-serverless}:<region>:<account>:namespace/ExampleNamespace" ] }, # This statement authorizes the user to view integrations connected to any target namespaces in the account { "Effect": "Allow", "Action": [ "redshift:DescribeInboundIntegrations" ], "Resource": [ "arn:aws:redshift{-serverless}:<region>:<account>:namespace/*" ] } ], "Version": "2012-10-17" }
  5. 暗号化キーの許可

    ソース DynamoDB テーブルがカスタマー管理 AWS KMS キーを使用して暗号化されている場合は、KMS キーに次のポリシーを追加する必要があります。このポリシーにより、Amazon Redshift は KMS キーを使用して暗号化されたテーブルからデータをエクスポートできます。

    { "Sid": "Statement to allow Redshift service to perform Decrypt operation on the source DynamoDB Table", "Effect": "Allow", "Principal": { "Service": [ "redshift.amazonaws.com" ] }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "<account>" }, "ArnEquals": { "aws:SourceArn": "arn:aws:redshift:<region>:<account>:integration:*" } } }

Amazon Redshift 管理ガイドの「ゼロ ETL 統合の開始方法」の手順に従って、Amazon Redshift 名前空間のアクセス許可を設定することもできます。

DynamoDB の Amazon Redshift とのゼロ ETL 統合を使用する場合の制約事項

この統合の現在のリリースには次の制限が適用されます。これらの制限は、後続のリリースで変更される可能性があります。

注記

以下の制限に加えて、ゼロ ETL 統合を使用する場合の一般的な考慮事項も確認してください。「Amazon Redshift 管理ガイド」の「Amazon Redshift との ゼロ ETL 統合を使用する場合の考慮事項」を参照してください。

  • DynamoDB テーブルと Amazon Redshift クラスターは同じリージョンにある必要があります。

  • ソース DynamoDB テーブルは、Amazon 所有またはカスタマー管理の AWS KMS キーで暗号化する必要があります。Amazon が管理する暗号化は、ソース DynamoDB テーブルではサポートされていません。