Questions tagged [amazon-dynamodb-index]
251 questions
0
votes
1 answer
Query the DynamoDb using a nested attribute ID
I have a DynamoDB table and items in the table that look something like this:
{
"id":"id",
"randomData":{
"randomData1":"randomData1",
"randomData2":"randomData2"
},
"status":"status",
"subTasks":[
{
…
0
votes
0 answers
DynamoDB Global Secondary Index Timeout Using Terraform
I'm experiencing a timeout in index creation using the following configuration on Terraform v0.13.6 and using AWS provider version 3.42.0:
resource "aws_dynamodb_table" "TestDB" {
name = "TestDB"
billing_mode = "PAY_PER_REQUEST"
…

zhanga
- 89
- 2
- 10
0
votes
1 answer
DynamoDB PK with more than 2 fields
Need best practice advice on how to define PK (hash+range) for this schema:
date
org
service
tps
Usage is to produce a daily report of peak tps for each service for a particular org.
So date+org+service will be unique, ie, any upsert of this combo…

Tech Newbie
- 51
- 1
- 5
0
votes
1 answer
How to get total count for given time period in DynamoDB?
Background: We have an api which different api users are calling from different companies. We are logging every request in DataDog. From DD, I am fetching those logs every minute, get the required data i.e. apiUserKey, companyName, dateAccessed,…

rashidkhan
- 462
- 8
- 24
0
votes
1 answer
How do you best structure your DynamoDb for multiple query parameters
In context of a tracker system, I have a situation, where the user's device deliver location data to backend and the system subsequently queries that data both per user and in bulk.
The structure of the data is as follows:
{"user_id": "user_1",…

user367231
- 97
- 6
0
votes
1 answer
C# DynamoDB inserting item with same primary key
Is there way to insert item with the same PK without overwriting them? I keep using PutItemRequest but It keeps updating the attributes with that PK.
{
TableName = "MovieRating",
Item = new…

Nooty
- 11
- 3
0
votes
0 answers
How to find messages by text in a Dynamodb chat application?
I see a lot of recommendations for using dynamodb with chat applications. It is really fast when querying by keys. However a chat needs search by message text functionality which could not be implemented in dynamodb, I’m interested how other people…

Dumitru
- 50
- 1
- 7
0
votes
1 answer
GSI on DynamoDB
I have dynamoDB table for order processing with following structure.
I have few more properties and I want to filter orders based on the status. For now I used scan method to get orders based on the status. But I would like to implement query…

Prasad
- 125
- 2
- 3
- 13
0
votes
1 answer
How to introduce a new column in dynamo DB running in production?
I have a use case where DynamoDB is running in production and I need to add a new column IDUpdatedAt which will also be serving as a sort key for one of the GSIs.
I tried a thing in test where my application adds the new rows with IDUpdatedAt, it's…

Ankit Rohilla
- 11
- 1
- 3
0
votes
2 answers
How to structure DynamoDB index to allow retrieval by multiple fields
I'm new to DynamoDB and trying to figure out how to structure my data/table/index. My schema includes an itemid (unique) and an orderid (multiple items per order), along with some other arbitrary attributes. I want to be able to retrieve a single…

wildabeast
- 1,723
- 3
- 18
- 31
0
votes
0 answers
Need to model a Date Range in DynamoDB
This seems like such an elementary part of databases, cannot believe Dynamo does not do this.
Supposing I have a Case. I have 2 dates: when the Case became active, and when it became inactive. I want to write a query that would return the count of…

Rob
- 11,446
- 7
- 39
- 57
0
votes
0 answers
DynamoDB Query: ScanIndexForward not working
Quick one I hope. I have a GSI on a table with a pk (composite string CAMP#g56gd-6…) and a sk (timestamp 166637384). When I apply ScanIndexForward to the query as true, it always returns the results in descending order.
Also a side issue is it…

Ryan Carville
- 355
- 7
- 15
0
votes
1 answer
Create index on nested array value with dynamodb
I have the following data stored in a DynamoDB table called elo-history.
{
"gameId": "chess",
"guildId": "abc123",
"id": "c3c640e2d8b76b034605d8835a03bef8",
"recordedAt": 1621095861673,
"results": [
{
"oldEloRating": null,
…

sissonb
- 3,730
- 4
- 27
- 54
0
votes
1 answer
DynamoDB schema design: compose a sort key vs LSI
I checked out a lot of DynamoDB tutorials and SO questions, but none of them covers my use case.
I have 3 columns:
Category
Subcategory
Item
Subcategories belongs to a Category, and the item is the only unique value.
I have read that (3 fields…

Dániel Flach
- 85
- 1
- 13
0
votes
0 answers
Is the DynamoDB table design efficient for Monitoring System?
I have to design a DynamoDB table for a Monitoring System.
The attributes present for each item are:
name (Monitor Name: String)
et (milliseconds epoch: Number)
owner (Owner of the monitor: String)
Below are the queries that I need to…

adarsh
- 1,393
- 1
- 8
- 16