AWS amazondynamodb documentation change
Summary
Added documentation for Contributor Insights monitoring modes (accessed and throttled keys vs throttled keys only), including mode comparison, console/CLI configuration steps, mode switching instructions, and example responses. Enhanced alarm creation guidance for different modes.
Security assessment
The changes focus on operational monitoring capabilities (tracking accessed/throttled keys) rather than addressing security vulnerabilities or introducing security controls. While throttling monitoring could help identify potential performance issues, there's no evidence this addresses a specific security vulnerability or implements security protections.
Diff
diff --git a/amazondynamodb/latest/developerguide/contributorinsights_tutorial.md b/amazondynamodb/latest/developerguide/contributorinsights_tutorial.md index 508c2f374..0b20bd854 100644 --- a//amazondynamodb/latest/developerguide/contributorinsights_tutorial.md +++ b//amazondynamodb/latest/developerguide/contributorinsights_tutorial.md @@ -5 +5 @@ -Using Contributor Insights (console)Using Contributor Insights (AWS CLI) +Choosing a Contributor Insights modeUsing Contributor Insights (console)Using Contributor Insights (AWS CLI) @@ -9 +9 @@ Using Contributor Insights (console)Using Contributor Insights (AWS CLI) -This section describes how to use Amazon CloudWatch Contributor Insights with the Amazon DynamoDB console or the AWS Command Line Interface (AWS CLI). +This section describes how to enable and use Amazon CloudWatch Contributor Insights in different modes to meet your monitoring needs using the Amazon DynamoDB console or the AWS Command Line Interface (AWS CLI). @@ -14,0 +15,2 @@ In the following examples, you use the DynamoDB table that is defined in the [Ge + * Choosing a Contributor Insights mode + @@ -21,0 +24,11 @@ In the following examples, you use the DynamoDB table that is defined in the [Ge +## Choosing a Contributor Insights mode + +Before enabling Contributor Insights, you should understand the two available modes. Review the mode comparison to select the option that best aligns with your specific requirements. + +Aspect | Accessed and throttled keys mode | Throttled keys mode +---|---|--- +**Monitors** | All requests (successful and throttled) | Only throttled requests +**Graphs** | Most Accessed Items + Most Throttled Items | Most Throttled Items only +**Best for** | Targeted analysis and optimization | Throttling monitoring +**Use when** | You need complete visibility into access patterns. You're doing short-term analysis or debugging. | Your primary concern is identifying and resolving throttling issues. You want to keep Contributor Insights enabled continuously for real-time throttling alerts. + @@ -23,0 +37,2 @@ In the following examples, you use the DynamoDB table that is defined in the [Ge +The console provides an intuitive way to enable Contributor Insights and select the appropriate mode for your monitoring needs. + @@ -38 +53,3 @@ In the following examples, you use the DynamoDB table that is defined in the [Ge - 6. In the **Manage Contributor Insights** dialog box, under **Contributor Insights Status** , choose **Enabled** for both the `Music` base table and the `AlbumTitle-index` global secondary index. Then choose **Confirm**. + 6. In the **Manage CloudWatch Contributor Insights settings** dialog box, toggle **Turn on** for both the `Music` base table and the `AlbumTitle-index` global secondary index. + + 7. Leave the **Only throttled keys mode** toggle in the off position for both and then choose **Save changes**. @@ -41,0 +59,2 @@ In the following examples, you use the DynamoDB table that is defined in the [Ge +This enables the default _accessed and throttled keys_ mode for both the table and GSI, which provides monitoring of both accessed and throttled items. Switching the **Only throttled keys mode** toggle to the on position would enable the _throttled keys_ mode. + @@ -44 +63 @@ If the operation fails, see [DescribeContributorInsights FailureException](https - 7. Choose **View in DynamoDB**. + 8. The CloudWatch Contributor Insights graphs are now visible on the **Monitor** tab for the `Music` table. Since you enabled _accessed and throttled keys_ mode, you see both accessed and throttled item graphs. @@ -46 +65 @@ If the operation fails, see [DescribeContributorInsights FailureException](https - + @@ -48 +66,0 @@ If the operation fails, see [DescribeContributorInsights FailureException](https - 8. The Contributor Insights graphs are now visible on the **Contributor Insights** tab for the `Music` table. @@ -50 +68,19 @@ If the operation fails, see [DescribeContributorInsights FailureException](https - + + +### Switching between modes + +You can switch between modes at any time without disabling Contributor Insights. + +###### To switch Contributor Insights modes + + 1. On the **Monitor** tab of your table, choose **Manage CloudWatch Contributor Insights**. + + 2. In the **Manage Contributor Insights settings** dialog box, for each base table or GSIs: + + * Toggle **Only throttled keys mode** on or off to enable the _throttled keys_ mode or go back to the default _accessed and throttled keys_ mode. + + * Toggle **Turn on** off to disable CloudWatch Contributor Insight for a table or GSI. + + 3. Choose **Save changes**. + +Once complete, the graphs will reflect the new mode. @@ -57 +93 @@ If the operation fails, see [DescribeContributorInsights FailureException](https -Follow these steps to create a CloudWatch alarm and be notified when any partition key consumes more than 50,000 [ConsumedThroughputUnits](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/contributorinsights_HowItWorks.html#contributorinsights_HowItWorks.Graphs.most-accessed). +Follow these steps to create a CloudWatch alarm and be notified when any partition key consumes more than 50,000 [ConsumedThroughputUnits](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/contributorinsights_HowItWorks.html#contributorinsights_HowItWorks.Graphs.most-accessed) or experiences throttling. @@ -63 +99,5 @@ Follow these steps to create a CloudWatch alarm and be notified when any partiti - 3. Choose the **DynamoDBContributorInsights-PKC-Music** rule. + 3. Choose the appropriate rule based on your mode and what you want to monitor: + + * For accessed items monitoring (accessed and throttled keys mode only): Choose **DynamoDBContributorInsights-PKC-Music** + + * For throttled items monitoring (both modes): Choose **DynamoDBContributorInsights-PKT-Music** @@ -81 +121,5 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - 8. Enter a value of 50000 for **threshold** and choose **Next**. + 8. Enter an appropriate threshold value and choose **Next** : + + * For accessed items (PKC rules): Enter 50000 for `ConsumedThroughputUnits` + + * For throttled items (PKT rules): Enter 1 for `ThrottleCount` to be alerted on any throttling @@ -92 +136 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s -###### To use Contributor Insights in the AWS CLI +The AWS CLI provides programmatic access to Contributor Insights with full support for both modes. You can specify the mode when enabling Contributor Insights or switch modes later. @@ -94 +138 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - 1. Enable CloudWatch Contributor Insights for DynamoDB on the `Music` base table. +### Basic operations with default mode @@ -96 +140,7 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - aws dynamodb update-contributor-insights --table-name Music --contributor-insights-action=ENABLE +###### To use Contributor Insights with default settings + + 1. Enable CloudWatch Contributor Insights for DynamoDB on the `Music` base table with the _accessed and throttled keys_ mode. Since `ACCESSED_AND_THROTTLED_KEYS` is the default mode, you can omit the `--contributor-insights-mode=ACCESSED_AND_THROTTLED_KEYS` parameter. + + aws dynamodb update-contributor-insights \ + --table-name Music \ + --contributor-insights-action=ENABLE @@ -100 +150,4 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - aws dynamodb update-contributor-insights --table-name Music --index-name AlbumTitle-index --contributor-insights-action=ENABLE + aws dynamodb update-contributor-insights \ + --table-name Music \ + --index-name AlbumTitle-index \ + --contributor-insights-action=ENABLE @@ -103,0 +157,33 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s + aws dynamodb describe-contributor-insights + --table-name Music + +The response will include the `ContributorInsightsMode` field showing `ACCESSED_AND_THROTTLED_KEYS`. + + 4. List the status of the `Music` table and all its indexes. + + aws dynamodb list-contributor-insights --table-name Music + + + + +### Enabling throttled keys mode + +###### To enable Contributor Insights in throttled keys mode + + 1. Enable CloudWatch Contributor Insights for DynamoDB on the `Music` base table with _throttled keys_ mode. + + aws dynamodb update-contributor-insights \ + --table-name Music \ + --contributor-insights-action=ENABLE \ + --contributor-insights-mode=THROTTLED_KEYS + + 2. Enable Contributor Insights in _throttled keys_ mode for the `AlbumTitle-index` global secondary index. + + aws dynamodb update-contributor-insights \ + --table-name Music \ + --index-name AlbumTitle-index \ + --contributor-insights-action=ENABLE \ + --contributor-insights-mode=THROTTLED_KEYS + + 3. Verify the mode by describing the Contributor Insights configuration. + @@ -106 +192 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - 4. Disable CloudWatch Contributor Insights for DynamoDB on the `AlbumTitle-index` global secondary index. +The response will show `ContributorInsightsMode` as `THROTTLED_KEYS` and fewer rules compared to the default mode. @@ -108 +193,0 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - aws dynamodb update-contributor-insights --table-name Music --index-name AlbumTitle-index --contributor-insights-action=DISABLE @@ -110 +194,0 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - 5. Get the status of the `Music` table and all its indexes. @@ -112 +196,74 @@ Only `Max Contributor Value` and `Maximum` return useful statistics. The other s - aws dynamodb list-contributor-insights --table-name Music + +### Switching between modes + +###### To switch Contributor Insights modes + + 1. Switch from _throttled keys_ mode to _accessed and throttled keys_ mode. + + aws dynamodb update-contributor-insights \ + --table-name Music \ + --contributor-insights-action=ENABLE \ + --contributor-insights-mode=ACCESSED_AND_THROTTLED_KEYS + + 2. Switch from _accessed and throttled keys_ mode to _throttled keys_ mode. + + aws dynamodb update-contributor-insights \ + --table-name Music \ + --contributor-insights-action=ENABLE \ + --contributor-insights-mode=THROTTLED_KEYS + + 3. Check the status during the transition. + + aws dynamodb describe-contributor-insights --table-name Music + +During the mode switch, the `ContributorInsightsStatus` will show as `ENABLING`. Once complete, it will show as `ENABLED` with the new mode. + + + + +### Managing Contributor Insights + +###### To manage Contributor Insights settings + + 1. Disable CloudWatch Contributor Insights for DynamoDB on the `AlbumTitle-index` global secondary index. + + aws dynamodb update-contributor-insights \ + --table-name Music --index-name AlbumTitle-index \ + --contributor-insights-action=DISABLE + + 2. List all Contributor Insights configurations in your account. + + aws dynamodb list-contributor-insights + +This shows all tables and indexes with Contributor Insights enabled, along with their modes. + + 3. Get detailed information about a specific configuration. + + aws dynamodb describe-contributor-insights \ + --table-name Music \ + --index-name AlbumTitle-index + + + + +### Example responses