Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

[Question] How to add DynamoDB LSI ? #177

Open
ronald8192 opened this issue Aug 5, 2018 · 1 comment
Open

[Question] How to add DynamoDB LSI ? #177

ronald8192 opened this issue Aug 5, 2018 · 1 comment

Comments

@ronald8192
Copy link

ronald8192 commented Aug 5, 2018

For example, I create a DynamoDB table by awsmobile-cli like this:
Hash key: OrderId (Number)
Range key: Priority (Number)
...

There is no LSI option when creating the table.
If I add index and select the same hash key, it will create a GSI.

$ awsmobile database configure
? Select from one of the choices below. Edit table from the project
? Select table to be edited my-table
? Select from one of the choices below. Add indexes
? Index name my-index-name
? Select partition key OrderId
? Select sort key CreatedAt
? Add index Yes

I also notice that I cannot select multiple range key or create index as LSI even on AWS console.

Is this a limitation of MobileHub?
Any way to create LSI for DynamoDB table for MobileHub project?

@ronald8192 ronald8192 changed the title [Problem] How to add DynamoDB LSI ? [Question] How to add DynamoDB LSI ? Aug 5, 2018
@elorzafe
Copy link
Contributor

elorzafe commented Aug 6, 2018

Hi @ronald8192, thanks for your feedback!

Currently awsmobile-cli can only create GSI, I will add this as a feature request

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

No branches or pull requests

2 participants