3
votes

We've been using boto3 to create and write to dynamodb tables. It's working well, but we also want to specify autoscaling properties when creating tables since this is now an option . I know this can be done manually, but we want to automate it as we create various tables with boto3 via our python backend. Has anyone had success doing this? If so, is it possible with the boto3 dynamodb client, with a higher-level boto3 client option, or otherwise?

1

1 Answers

3
votes

Here is the documentation for autoscaling,

http://boto3.readthedocs.io/en/latest/reference/services/application-autoscaling.html

You need to use the namespace 'dynamodb' to autoscale dynamodb.

You can also do via cli it will also give you an idea on parameters,

aws application-autoscaling register-scalable-target \
    --service-namespace dynamodb \
    --resource-id "table/TestTable" \
    --scalable-dimension "dynamodb:table:WriteCapacityUnits" \
    --min-capacity 5 \
    --max-capacity 10 \
    --role-arn roleARN

Reference:

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.CLI.html

Hope it helps.