Reputation: 5
I am trying to create a dynamodb table with python and below is my code but how to keep ProvisionedThroughput readcapacity and writecapacity with auto scaling
table = dynamodb_client.create_table(
TableName=table_name,
KeySchema=[
{
'AttributeName': 'DeviceID',
'KeyType': 'HASH' #Partition key
},
{
'AttributeName': 'Timestamp',
'KeyType': 'RANGE' #Sort key
}
],
AttributeDefinitions=[
{
'AttributeName': 'DeviceID',
'AttributeType': 'S'
},
{
'AttributeName': 'Timestamp',
'AttributeType': 'N'
},
],
)
Upvotes: 0
Views: 250
Reputation: 238081
You have to setup ApplicationAutoScaling, as autoscaling in DynamoDB is managed by Application AutoScaling. This is done using entire different set of boto3 commands, e.g. put_scaling_policy.
Upvotes: 1