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

modified: pynamodb/connection/base.py #21

Merged
merged 1 commit into from May 15, 2014
Merged

modified: pynamodb/connection/base.py #21

merged 1 commit into from May 15, 2014

Conversation

silvexis
Copy link

The following ensures the key_schema in indexes is sorted appropriately because AWS's API requires the HASH key to come first. Depending on how the stars align, you may or may not end up with your local or global index key_schema out of order resulting in the following error when creating your table:

pynamodb.exceptions.TableError: Failed to create table: {"__type":"com.amazon.coral.validate#ValidationException","message":"Invalid KeySchema: The first KeySchemaElement is not a HASH key type"

jlafon added a commit that referenced this pull request May 15, 2014
	modified:   pynamodb/connection/base.py
@jlafon jlafon merged commit dac15ea into pynamodb:devel May 15, 2014
@jlafon
Copy link
Contributor

jlafon commented May 15, 2014

Thanks, I'll add a test for this as well.

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.

None yet

2 participants