When setting up a Global Secondary Index model in PynamoDB, the read and write capacity units have to be specified. These are not needed if not provisioning a table or index, yet are not optional. Arbitrary values can be used and nothing will be done with them.

Example#

class ModelIndex(GlobalSecondaryIndex):
  class Meta:
      index_name = "model-index"
      read_capacity_index = 0  # Not used, since the table isn't being provisioned
      write_capacity_index = 0
      projection = AllProjection
  model_key = UnicodeAttribute(hash_key=True)