question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamo primary sort key

See original GitHub issue

Is 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:closed
  • Created 5 years ago
  • Reactions:24
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
mart2967commented, Dec 9, 2018

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.

3reactions
mikeparisstuffcommented, Dec 4, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found