Questions tagged [amazon-dynamodb-index]
251 questions
2
votes
0 answers
DynamoDB Query with Global Secondary Index throws 'ValidationException: Query key condition not supported'
When trying to execute the query from the AppSync console in AWS, the following error keeps popping up, as seen in the logs of CloudWatch: 'ValidationException: Query key condition not supported'
I have tried changing the schema with different types…

Bob Meijwaard
- 388
- 9
- 20
2
votes
2 answers
DynamoDB, force combination of fields uniqueness
I have the following entity:
class Terms {
//hash key
private String code;
private String region;
private String market;
private String brand;
private String productType
}
Which is persisted to Dynamo DB table. I need…

Andrey Yaskulsky
- 2,458
- 9
- 39
- 81
2
votes
1 answer
DynamoDB - Get Item by Global Secondary Index
I have an existing table which has 10 fields. Fields are like this:
AuthID, UserID, Age, Job, .etc
The table stores data of my users. "AuthID" is primary key and "UserID" is a Global Secondary Index.
When I get item by AuthID, everything is fine.…

Yusuf Demir
- 57
- 6
2
votes
0 answers
How to model joining 3 entities in single DynamoDB table?
I have a simple relational model that I would like to create in DyanamoDB using a single table design. The model is for a restaurant review app:
The entities are:
Users => user` has one-to-many reviews
Review => restaurant has one-to-many…

Thomas Collins
- 308
- 1
- 2
- 9
2
votes
2 answers
Time based Expiration/Generation of Records/Events/Messages for Actions
I am creating a script for Task Assignment to multiple users. A task is assigned to a user, if it is not accepted in the next 30 minutes, I need to re-assign to another user.
Actually, I used DynamoDB for this, where every task assignment is…

Pranay Agarwal
- 21
- 1
2
votes
1 answer
How to achieve sorting by any attribute of an item in DynamoDB
I have a DynamoDB structure as following.
I have patients with patient information stored in its documents.
I have claims with claim information stored in its documents.
I have payments with payment information stored in its documents.
Every claim…

I.K.
- 414
- 6
- 18
2
votes
1 answer
Do failed conditional writes on a DynamoDB table consume write capacity of GSI
I have a DynamoDB table and it has a GlobalSecondaryIndex on it. I am doing conditional writes to the DynamoDB table. I understand that if the record has to be updated in the GSI as well, then such writes consume capacity on both the table and the…

Sonu Mishra
- 1,659
- 4
- 26
- 45
2
votes
1 answer
DynamoDB: filter and sort the same field?
I have a table with Local Index like below.
how to make a query like startDate < InvoiceDate < endDate and sort the result descending by InvoiceDateLocalIndex ??
as far as I know, to sort the result I need to using InvoiceDateLocalIndex. But if I'd…

luan hdwebsoft
- 35
- 4
2
votes
1 answer
AWS DynamoDB GSI query all partitions
I saw the following sentence in AWS DynamoDB documentation: A global secondary index lets you query over the entire table, across all partitions. I am wondering what this really means. I thought it meant that you could use > for example in a…

jimmone
- 446
- 1
- 6
- 15
2
votes
1 answer
dynamodb query im trying to get some data from dynamodb using laravel
the query is work now but the problem is the attribute_not_exists when I added the attribute_not_exists the whole query not working.
error message: "One or more parameter values were invalid: Secondary (truncated...)
ValidationException (client):…

mic_test
- 121
- 2
- 13
2
votes
2 answers
AWS DynamoDB Query : finding the count of matching records
I have a DynamoDB table. I have an index on the "Id" field.
I also have other fields - status, timestamp, etc, but I don't have index on these other fields.
The status can be "online", "offline", "in-progress", etc.
I want to get the count of the…

Dattatray
- 1,745
- 1
- 21
- 49
2
votes
0 answers
DynamoDB scalability: How to design the partionkey vs index
as described in https://aws.amazon.com/blogs/database/choosing-the-right-dynamodb-partition-key/ , the partition key should be unique.
I am building an application that needs to store subscriptions to a topic (think of a chat app). Millions of those…

wzr1337
- 3,609
- 5
- 30
- 53
2
votes
1 answer
When it's worth the tradeoff of using local secondary index in DynamoDB?
I've read guidelines for secondary indexes but I'm not sure when the ability to search fast outweighs the disadvantage of scan over attributes. Let me give you an example.
I am saving game progress data for users. The PK is user ID. I need to be…

Martin
- 303
- 5
- 14
2
votes
1 answer
Is it possible to update the attribute value which is part of the primary key in DynamoDB?
I have table with "RefNumber", "status" and "Date". "RefNumber" is the partition Key and "Status" is the sort key So, both make a primary key.
{
"RefNumber": "122345",
"Status": "0",
"DateTime": 15343354545
}
Now after fetching this…

Dhananjay
- 85
- 1
- 11
2
votes
0 answers
Is there any way to apply filterExpression first before apply pagination limit in dynamo query operation.?
I found one big issue with dynamodb pagination.
- I perform query operation with following params
params = {
"TableName": "DEV_post",
"ProjectionExpression": "postId, postType",
"ExpressionAttributeValues":…

Ashish Sharma
- 446
- 5
- 14