PynamoDB icon indicating copy to clipboard operation
PynamoDB copied to clipboard

support for Model.create_table() to create a table with default autoscaling capacity

Open devangmehta123 opened this issue 7 years ago • 12 comments

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.

devangmehta123 avatar Nov 20 '17 12:11 devangmehta123

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.

dmulter avatar Dec 30 '17 14:12 dmulter

Any update on this issue? I would very much like to create a table from pynamodb with autoscaling enabled by default.

aleph0ne avatar Jul 11 '18 02:07 aleph0ne

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

dhruvsakalley avatar Jul 18 '18 21:07 dhruvsakalley

Any news about that?

andreborges-janrain avatar Sep 04 '18 18:09 andreborges-janrain

Ping ?

Seluj78 avatar Aug 14 '19 13:08 Seluj78

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.

ikonst avatar Aug 14 '19 17:08 ikonst

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

Screenshot 2019-08-14 at 20 33 34

Seluj78 avatar Aug 14 '19 18:08 Seluj78

@Seluj78 What I'm asking is how is it useful to you? Are you provisioning production tables with PynamoDB?

ikonst avatar Aug 14 '19 18:08 ikonst

@ikonst this is totally going to look dumb but I forgot why I needed it... So nvm I guess, my bad 😖

Seluj78 avatar Aug 14 '19 18:08 Seluj78

But no I am not

Seluj78 avatar Aug 14 '19 18:08 Seluj78

I'd definitely like to be able to provision production tables this way fwiw

rblakemesser avatar Mar 11 '23 17:03 rblakemesser

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?

monkut avatar Jun 07 '23 03:06 monkut