既存の DynamoDB テーブルのウォームスループットを増やす
DynamoDB テーブルの現在のウォームスループット値を確認したら、次のステップで値を更新できます。
DynamoDB コンソールを使用して DynamoDB テーブルのウォームスループット値を確認するには:
AWS Management Console にサインインして DynamoDB コンソール (https://console.aws.amazon.com/dynamodb/
) を開きます。 -
左のナビゲーションペインで、[テーブル] を選択します。
-
[テーブル] ページで、目的のテーブルを選択します。
-
[ウォームスループット] フィールドで、[編集] を選択します。
-
[ウォームスループットを編集] ページで、[ウォームスループットを増やす] を選択します。
-
[1 秒あたりの読み取りユニット] と [1 秒あたりの書き込みユニット] を調整します。これら 2 つの設定は、テーブルが即座に処理できるスループットを定義します。
-
[保存] を選択します。
-
リクエストの処理が完了すると、[ウォームスループット] フィールドで [1 秒あたりの読み取りユニット] と [1 秒あたりの書き込みユニット] が更新されます。
注記
ウォームスループット値の更新は非同期タスクです。更新が完了すると、
Status
はUPDATING
からACTIVE
に変わります。
次の AWS CLI の例は、DynamoDB テーブルのウォームスループット値を更新する方法を示しています。
-
DynamoDB テーブルで
update-table
オペレーションを実行します。aws dynamodb update-table \ --table-name GameScores \ --warm-throughput ReadUnitsPerSecond=12345,WriteUnitsPerSecond=4567 \ --global-secondary-index-updates \ "[ { \"Update\": { \"IndexName\": \"GameTitleIndex\", \"WarmThroughput\": { \"ReadUnitsPerSecond\": 88, \"WriteUnitsPerSecond\": 77 } } } ]" \ --region us-east-1
-
次のようなレスポンスが表示されます。
WarmThroughput
設定は、ReadUnitsPerSecond
およびWriteUnitsPerSecond
として表示されます。ウォームスループット値が更新されている場合、Status
はUPDATING
になり、新しいウォームスループット値が設定されている場合は、ACTIVE
になります。{ "TableDescription": { "AttributeDefinitions": [ { "AttributeName": "GameTitle", "AttributeType": "S" }, { "AttributeName": "TopScore", "AttributeType": "N" }, { "AttributeName": "UserId", "AttributeType": "S" } ], "TableName": "GameScores", "KeySchema": [ { "AttributeName": "UserId", "KeyType": "HASH" }, { "AttributeName": "GameTitle", "KeyType": "RANGE" } ], "TableStatus": "ACTIVE", "CreationDateTime": 1730242189.965, "ProvisionedThroughput": { "NumberOfDecreasesToday": 0, "ReadCapacityUnits": 20, "WriteCapacityUnits": 10 }, "TableSizeBytes": 0, "ItemCount": 0, "TableArn": "arn:aws:dynamodb:us-east-1:XXXXXXXXXXXX:table/GameScores", "TableId": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "GlobalSecondaryIndexes": [ { "IndexName": "GameTitleIndex", "KeySchema": [ { "AttributeName": "GameTitle", "KeyType": "HASH" }, { "AttributeName": "TopScore", "KeyType": "RANGE" } ], "Projection": { "ProjectionType": "INCLUDE", "NonKeyAttributes": [ "UserId" ] }, "IndexStatus": "ACTIVE", "ProvisionedThroughput": { "NumberOfDecreasesToday": 0, "ReadCapacityUnits": 50, "WriteCapacityUnits": 25 }, "IndexSizeBytes": 0, "ItemCount": 0, "IndexArn": "arn:aws:dynamodb:us-east-1:XXXXXXXXXXXX:table/GameScores/index/GameTitleIndex", "WarmThroughput": { "ReadUnitsPerSecond": 50, "WriteUnitsPerSecond": 25, "Status": "UPDATING" } } ], "DeletionProtectionEnabled": false, "WarmThroughput": { "ReadUnitsPerSecond": 12300, "WriteUnitsPerSecond": 4500, "Status": "UPDATING" } } }
次の SDK の例は、DynamoDB テーブルのウォームスループット値を更新する方法を示しています。