Questions tagged [amazon-dynamodb-index]
251 questions
0
votes
1 answer
How to efficiently query a list column in dynamodb?
I have a table that maps a parent key into multiple foreign keys. For example:
domain (hash)
parent key (sort)
foreign keys
1
A
[B1, Y2, Z3]
1
X
[B4, G6, Y9]
This structure is optimized for the most common workload, which is to lookup…

Matty F
- 3,763
- 4
- 30
- 48
0
votes
3 answers
Create aws dynamodb table by yml file
I am trying to create a dynamodb table from yml file to make a microservice, but it tells me that the table does not exist
Error:
UPDATE_FAILED: productGroupTable (AWS::DynamoDB::Table)
Resource handler returned message: "Table: productGroupTableDev…
0
votes
1 answer
DynamoDB asks for Partition Key of main table when querying GSI
So, the thing is, I'm trying to query a GSI table on DynamoDB and get a really weird behaviour.
The main table schema is as follows
- Partition key: test_id (string)
- Sort key: version (string)
- Other attributes (createdAt, tags,…

agus97v
- 3
- 3
0
votes
2 answers
Dynamodb bulk query
I have an index used for bulk operations on collections that is experiencing throttling. To mitigate this am planning to shard the index so each pk is split over whatever number of partitions. At the moment there is a delete operation running on…

Person1
- 109
- 2
- 10
0
votes
2 answers
AWS DynamoDB get rows sort by (order by) multiple columns
I need to get the rows by key (e.g. where status is "Active") but with sorting on multiple columns.
I'm using the pagination that's why I cannot sort the result after fetching it from the DynamoDB. (Just for the information, I'm using the serverless…

Ghanashyam Chaudhari
- 11
- 1
0
votes
1 answer
Is it sensible to create unused generic local secondary indexes on my DynamoDB tables in case I need them later?
I currently have a need to add a local secondary index to a DynamoDB table but I see that they can't be added after the table is created. It's fine for me to re-create the table now while my project is in development, but it would be painful to do…

Jon Colverson
- 2,986
- 1
- 24
- 24
0
votes
2 answers
DynamoDB Global Secondary Index "Batch" Retrieval
I've see older posts around this but hoping to bring this topic up again. I have a table in DynamoDB that has a UUID for the primary key and I created a secondary global index (SGI) for a more business-friendly key. For example:
| account_id |…

ChrisS
- 45
- 5
0
votes
1 answer
Update Multiple Items in DynamoDB without exceeding Maximum Throughput
I'm trying to perform update_item to my DynamoDB for each entry in a list. In the list the columns are id and total_sales where the total sales updates every hour. The idea is to parse the list and update each item (associated with the id in the…

dev1398
- 1
- 1
0
votes
1 answer
Order by multipe columns together and limit the records in DDB
I am trying to model the below table using DynamoDB:
A (String) | B (String) | C (String) | D (Integer) | E (Integer) | start_date (Timestamp) | end_date (Timestamp) where columns uniquely define each tuple
The query pattern is: Give list…

Ramesh
- 167
- 1
- 10
0
votes
1 answer
Make DynamoDB GSI strongly consistent
How long should I wait after putting the record to make scan/query using GSI strongly consistent? My use case has asynchronous workflows which can afford to wait for 5-10 minutes. I need to know how much wait time is sufficient to ensure that I'm…

Aditya Abhas
- 174
- 11
0
votes
1 answer
Parallel insertion in Dynamo DB
I have 3 clients. All of them want to insert items in the same database.
Whenever a client sends a request,
I need to read the last entered record in ddb.
Increase its id by 1.
Push this new request in the ddb with the increased id.
What's the…

Mumbaikar007
- 441
- 1
- 6
- 16
0
votes
1 answer
How to query 100 first items ordered by sort key of a DynamoDB table?
I have a simple DynamoDB table called Scores with 3 attributes:
| id | score | username |
|--------------------------------------|-------|----------|
| ed6dbe2f-ffb3-44f3-a5f1-bb84502e5400 | 300 | bob |
|…

Vivien Adnot
- 1,157
- 3
- 14
- 30
0
votes
1 answer
How to authorize users to access GSI
How do I authorizer all users to access a GSI? (In my case, the userIndex)
I can access the primary-index just fine. I successfully authorized all users to access the primary-index the following way:
Here I target the primary-index, which works…

Sebastian Nielsen
- 3,835
- 5
- 27
- 43
0
votes
1 answer
How to query over LSI in dynamoDb with Java
I have a DynamoTable which has a LSI created as FOOD-OFFER#TIMESTAMP#2021-08-02T00:00:000Z#4567
4567 is offerID
I want to fetch results within a date range.
Is it possible to use beginsWith and between together. My Search criteria has only Dates in…

Sajal Saxena
- 191
- 1
- 3
- 16
0
votes
1 answer
DynamoDB LSI or GSI to query on composite attribute
I'm trying to use DynamoDB for my JAVA project and I have this (from my point of view) strange scenario that I have to cover. Let me to explain how I organize my table:
Suppose that I have to store these info related to Books:
book_id (UUID) used…

Safari
- 11,437
- 24
- 91
- 191