Dynamo primary sort key
See original GitHub issueIs your feature request related to a problem? Please describe.
amplify init
and amplify push
api commands don’t allow for Dynamo tables to be created with a sort key.
Describe the solution you’d like There was some discussion here of a possible solution but it doesn’t seem to be implemented yet https://github.com/aws-amplify/amplify-cli/issues/56#issuecomment-416736520
Also discussed here https://github.com/aws-amplify/amplify-cli/pull/277#issuecomment-428690938
Something like this seems like it would work for my case of needing a sort key on a timestamp
type DeviceData @model {
id: ID!
timestamp: String! @sort
value: String!
}
Describe alternatives you’ve considered Not aware of any, would be open to anything since sort keys cannot be added to already created Dynamo tables.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:24
- Comments:22 (4 by maintainers)
Top Results From Across the Web
Best practices for using sort keys to organize data
In an Amazon DynamoDB table, the primary key that uniquely identifies each item in the table can be composed not only of a...
Read more >DynamoDB Sort Key - The Ultimate Guide [w - Dynobase
The sort key is used to sort and order items in a partition. Multiple items with the same partition key value are feasible,...
Read more >Key Concepts - DynamoDB, explained.
The sort key is used to (wait for it) sort items with the same partition. One example could be an Orders tables for...
Read more >What is the difference between partition key and sort key in ...
The (optional) sort key determines the order of how data with the same partition key is stored. Using a clever sort key allows...
Read more >Amazon DynamoDB Primary Key, Partition Key and Sort Key ...
Amazon DynamoDB Primary Key, Partition Key and Sort Key ... We can say that primary key uniquely identifies each item in the table,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is definitely our most needed feature at the moment. Would it be feasible to support specifying multiple sort fields? Example: sorting on createdAt or updatedAt. Clients would then specify what sort type to use in their graphql query variables.
Thank you for the note. This is a highly request feature and your feedback really helps us prioritize it. I will make sure this is included in discussions and will report back when I have more details.