- Newest
- Most votes
- Most comments
In which region are you trying this? I am able to create items with negative numbers as primary key with no issue:
As sudden as it stopped working it is now back to working again. I guess someone fixed the validation bug as negative query values are now allowed again.
Thank you to the people suggesting potential solutions.
Adding to the other answer:
It sounds like you're pasting a number in and that the minus sign at the beginning of the number isn't a minus sign - it just looks like one. So check to see that the minus sign is really an ASCII 45 (decimal) character. The other way this could happen is if there is some auto-correct thing happening within your browser.
Hello and thank you for helping! No, actually I am very certain it is valid! I simply write something like "-123" and it is not accepted. However, I was incorrect in my post, it is in the "Explore Items" window this happens. Like I wrote in the question this has been working just the day before (and an additional 4+ years for that matter) but with the to me recently updated UI from AWS this just stopped working with the error message "Invalid number. You must use ASCII numeric values".
It seems that they overlooked the primary IDs can be negative in the field validation or something. I am not sure how to file a bug report about it or resolve it elsewhere.
I apologize for the inconvenience you're experiencing with the AWS Console interface for DynamoDB. While I don't have specific information about recent changes to the console interface that would prevent the use of negative numbers as primary keys, I can provide some general information and suggestions.
DynamoDB itself supports using numbers (including negative numbers) as primary key values. The primary key attributes in DynamoDB can be of type string, number, or binary. There are no restrictions on using negative numbers for number-type primary keys in the actual DynamoDB service.
The issue you're encountering seems to be specific to the AWS Web Console interface, which appears to be incorrectly validating the input for primary key values. This could potentially be a bug in the console interface.
Here are a few suggestions:
-
Try using a different method to query your DynamoDB table, such as the AWS CLI or one of the AWS SDKs. These should allow you to use negative numbers as primary keys without issue.
-
You can report this issue to AWS support or through the AWS forums. They would be best positioned to address and potentially fix this console interface problem.
-
As a temporary workaround, you might consider using a string representation of the negative number (e.g., "-123" as a string instead of a number) if that's accepted by the console interface.
-
Double-check that there haven't been any recent changes to your table schema or key structure that might be affecting this behavior.
Remember, this appears to be a limitation of the current web console interface and not a restriction of DynamoDB itself. Your data with negative primary keys should still be accessible through other means of interacting with DynamoDB.
Sources
Core components of Amazon DynamoDB - Amazon DynamoDB
PrimaryKeyObject - AWS Serverless Application Model
Hello friendly AI! This is not quite what I was looking for. The tables are fine, but the recent AWS Console Web UI interface has a front end validation for the search query input field that is preventing negative numbers from being used to query elements with negative primary keys. Any thoughts about what I can do to report that issue? It is still a problem.
Relevant content
- asked 2 years ago
- asked a year ago

Hello and thank you for the quick answer! I got stuck with other things and apologise the late reply now when you were so quick to assist!
I am in a region (?) (re:post is actively censoring the region name) and I was wrong with the interface, it was the "Explore Items" UI that is having this issue. I select a table and when entering the search query for a primary key I get the validation error in the UI "Invalid number. You must use ASCII numeric values". This was working the day before but broke when AWS changed the UI for me to their latest updated one. It seems to be a front end validation error as obviously the negative primary keys can be queried from the database!
I am not sure how to report this issue as a bug or similar. It has been working fine for 4+ years and just broke the same day I wrote the question, when they forced the new UI on me.