falcano icon indicating copy to clipboard operation
falcano copied to clipboard

fix: Adds ProvisionedThroughput to table schema

Open gHerzmann opened this issue 4 years ago • 0 comments

Was receiving the following error when trying to create a table using billing_mode = "PROVISIONED":

ClientError: An error occurred (ValidationException) when calling the CreateTable operation: No provisioned throughput specified for the table

This is the code to reproduce the issue:

from falcano.attributes import UnicodeAttribute
from falcano.model import Model

class BaseModel(Model):
    class Meta(Model.Meta):
        table_name = "tablename"
        host = 'http://localhost:8000'
        read_capacity_units = 1
        write_capacity_units = 1
        billing_mode = "PROVISIONED"

    pk = UnicodeAttribute(hash_key=True)
    sk = UnicodeAttribute(range_key=True)

BaseModel.create_table(wait=True)

Although the ProvisionedThroughput key was being added to the index schema, it was not being added to the table schema.

gHerzmann avatar Sep 13 '21 18:09 gHerzmann