Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix createTable() with GlobalSecondaryIndexes #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

austeny
Copy link

@austeny austeny commented Nov 15, 2023

The plugin runs into errors when creating tables with GlobalSecondaryIndexes defined. This is because the AWS DynamoDB API describeTable() returns additional properties in the GSI ProvisionedThroughput object that are not expected when performing a createTable(). These extra properties are defined here https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ProvisionedThroughputDescription.html (eg. NumberOfDecreasesToday)

This fixes the issue noted in #18.

There is a conditional to add the ProvisionedThroughput property to the GSI because an empty object or undefined would throw and error since if this property exists then the API expects the Read/WriteCapacityUnits to be >=1 which doesn't handles cases where this property isn't used in a GSI and the Billing Mode is PAY_PER_REQUEST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant