PynamoDB
PynamoDB copied to clipboard
support for Model.create_table() to create a table with default autoscaling capacity
I have tried Model.create_table() in version 3.2 without setting read_capacity_units and write_capacity_units. pynamo throws an exception that saying that it needs ints between 1-inf for these.
But I was hoping that it would create the tables with the default AWS autoscale settings which apply when you manually create the table through the console.
And to me it seems to be a very useful feature addition which could hlep many users of pynamodb.
If there is a workaround, please let me know.
I'm actually just looking for support of the new auto-scaling feature. I assume there would be new Meta fields for controlling read/write scaling and the associated parameters.
Any update on this issue? I would very much like to create a table from pynamodb with autoscaling enabled by default.
It'll be interesting to be able to manage dynamodb scaling even post creation. I'm ingesting large data files into dynamodb and then reducing capacity to apply autoscaling later. I wonder how the update scenarios will be handled here. Unfortunately though the boto client for dynamodb does not support autoscaling, you have to do that using application-autoscaling client, which is even more verbose. https://boto3.readthedocs.io/en/latest/reference/services/application-autoscaling.html
Any news about that?
Ping ?
I think right now our story for provisioning and reprovisioning tables with PynamoDB on actual AWS DynamoDB is pretty weak.
We're using PynamoDB at Lyft, and within Lyft we effectively only use PynamoDB's create_table
in development against dynamodb-local and dynalite, while our production provisioning is done with Terraform. I suspect many organizations are similar, but I'll be happy to hear more perspectives.
Well same here @ikonst, just that I was wondering if it would be possible to have an option in create_table
to set the auto scaling parametters like in the console

@Seluj78 What I'm asking is how is it useful to you? Are you provisioning production tables with PynamoDB?
@ikonst this is totally going to look dumb but I forgot why I needed it... So nvm I guess, my bad 😖
But no I am not
I'd definitely like to be able to provision production tables this way fwiw
Yes, if we have read_capacity_units
and write_capacity_units
settings in Meta, it would be helpful to have auto-scale capability as well.
class Meta:
read_capacity_units = 2 # with auto-scale use as minimum?
max_read_capacity_units = 10
write_capacity_units = 2 # with auto-scale use as minimum?
max_write_capacity_units = 10
Is there any down side to setting the auto-scale configuration?
If not, maybe default max_read_capacity_units
to read_capacity_units
, and if given use that value?