選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

DynamoDB 專用 CloudWatch Contributor Insights 入門

焦點模式
DynamoDB 專用 CloudWatch Contributor Insights 入門 - Amazon DynamoDB

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

本節說明如何將 Amazon CloudWatch Contributor Insights 與 Amazon DynamoDB 主控台或 AWS Command Line Interface () 搭配使用AWS CLI。

在下列範例中,您會用到 DynamoDB 入門教學課程中定義的資料表。

使用 Contributor Insights (主控台)

在主控台中使用貢獻者洞察
  1. 登入 AWS Management Console 並在 開啟 DynamoDB 主控台https://console.aws.amazon.com/dynamodb/

  2. 在主控台左側的導覽窗格中,選擇 Tables (資料表)。

  3. 選擇 Music 資料表。

  4. 選擇 監控 索引標籤。

  5. 選擇開啟 CloudWatch 貢獻者洞察

    顯示監控索引標籤和按鈕的主控台螢幕擷取畫面。
  6. 進入 Manage Contributor Insights (管理 Contributor Insights) 對話方塊,在 Contributor Insights Status (Contributor Insights 狀態) 下,為 Music 基礎資料表和 AlbumTitle-index 全域次要索引選擇 Enabled (啟用)。然後選擇 Confirm (確認)。

    主控台螢幕擷取畫面顯示 Contributor Insights 狀態清單選項。

    如果操作失敗,請參閱 DescribeContributorInsights FailureException Amazon DynamoDB API參考中的 了解可能的原因。

  7. 選擇 View in DynamoDB (在 DynamoDB 中檢視)。

    主控台螢幕擷取畫面顯示 Contributor Insights 設定中的 View in DynamoDB (在 DynamoDB 中檢視) 按鈕。
  8. Contributor Insights 圖表現在可以在 Music 資料表的 Contributor Insights 索引標籤找到。

    主控台螢幕擷取畫面顯示 Contributor Insights 標籤與適用於音樂資料表的幾個圖表。

建立 CloudWatch 警示

請依照下列步驟建立 CloudWatch 警示,並在任何分割區金鑰耗用超過 50,000 時收到通知ConsumedThroughputUnits

  1. 登入 AWS Management Console 並在 開啟 CloudWatch 主控台 https://console.aws.amazon.com/cloudwatch/

  2. 在主控台左側的導覽窗格中,選擇 Contributor Insights

  3. 選擇 D ynamoDBContributorInsights-PKC-Music 規則。

  4. 選擇 Actions (動作) 下拉式功能表。

  5. 選擇 View in metrics (在指標中檢視)。

  6. 選擇 Max Contributor Value (作者值上限)。

    注意

    只有 Max Contributor ValueMaximum 會傳回有用的統計數字。此清單中的其他統計數字不會傳回有意義的值。

    主控台螢幕擷取畫面顯示 Contributor Insights 索引標籤和按鈕。
  7. Actions (動作) 欄中,選擇 Create Alarm (建立警示)。

    主控台螢幕擷取畫面顯示 Contributor Insights 狀態清單選項。
  8. 輸入值 50000 做為閾值,然後選擇 Next (下一步)。

    主控台螢幕擷取畫面顯示 Contributor Insights 索引標籤和按鈕。
  9. 如需如何設定 CloudWatch 警示通知的詳細資訊,請參閱使用 Amazon 警示。

使用 Contributor Insights (AWS CLI)

若要在 中使用貢獻者洞察 AWS CLI
  1. Music基礎資料表上啟用 DynamoDB 的 CloudWatch Contributor Insights。

    aws dynamodb update-contributor-insights --table-name Music --contributor-insights-action=ENABLE
  2. AlbumTitle-index 全域次要索引上啟用 DynamoDB 專用 Contributor Insights。

    aws dynamodb update-contributor-insights --table-name Music --index-name AlbumTitle-index --contributor-insights-action=ENABLE
  3. 取得 Music 資料表及其所有索引的狀態和規則。

    aws dynamodb describe-contributor-insights --table-name Music
  4. AlbumTitle-index全域次要索引上停用 DynamoDB 的 CloudWatch Contributor Insights。

    aws dynamodb update-contributor-insights --table-name Music --index-name AlbumTitle-index --contributor-insights-action=DISABLE
  5. 取得 Music 資料表及其所有索引的狀態。

    aws dynamodb list-contributor-insights --table-name Music

下一個主題:

使用 IAM

上一個主題:

運作方式
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。