Questions tagged [amazon-dynamodb-index]
251 questions
0
votes
1 answer
DynamoDB not indexing items in GSI as expected
hope to find you well :)
I am trying to create a DynamoDB table with a GSI using the aws CDK. Here is my code:
export class LeaderboardsTableStack extends cdk.Stack {
public leaderboardsTable
constructor(scope: Construct, id: string,…
user22265191
0
votes
0 answers
DynamoDB table design for heterogeneous data
I'm trying to understand the best way to design my DynamoDB table. Let me introduce an example to explain my doubts.
Suppose I need to store customer invoices with the following fields:
Invoice Unique ID…

Safari
- 11,437
- 24
- 91
- 191
0
votes
1 answer
DyamoDB with heterogeneous data and multiple indexes
I'm trying to use DynamoDB for a project and I need some clarifications about the table schema design and indexes definition.
Let me to provide you an example of the data that I need to store.
Suppose that I created a table with this schema:
ID…

Safari
- 11,437
- 24
- 91
- 191
0
votes
2 answers
Node.js AWS SDK PutItem on a specific GSI
I want to insert an item on a GSI, however the AWS SDK library doesn't seem to cooperate.
This is the relevant code:
const updateLeaderbordAggreagte = async (documentClient, leaderboardPK, tournamentPoints, participant) => {
try {
const…

ETisREAL
- 90
- 1
- 2
- 9
0
votes
0 answers
DynamoDB Access Pattern
I'm trying to familiarize myself with DynamoDB and I'm facing the following problem.
My data record looks like this:
Crew{
id: string,
firstName: string,
lastName: string,
email: string,
roles: Role[],
address: Address
}
Role{
name:…

fuwa07
- 73
- 6
0
votes
1 answer
How to determine range key from index name even when Pk, SK are passed
I am trying to connect to dynamoDB and fetching data. This is how my code looks.
I tried catching the exception. It says
Unable to determine range key from index name.
CustomerManager.cs
public async Task
- > GetCustomers()
…

xoxo
- 1,248
- 14
- 19
0
votes
1 answer
How to do a dynamic search using multiple attributes in DynamoDB?
I have a user table with following attributes:
FirstName
LastName
City
CompanyName
I want to query the table with any combination of these attributes and that too partial .
For example:
Input - Firstname- "bh" and lastname - "ta"
Output -A Record…

Abhishek Gupta
- 3
- 1
0
votes
2 answers
Order on a Dynamo DB GSI with multiple items with same PK and SK
I was modeling a DynamoDB table and noticed that one solution I was considering could lead to a particular scenario of having duplicate keys on the GSI. The first tests I ran to determine the order proved inconclusive, so I moved to a different…

dege
- 2,824
- 2
- 25
- 33
0
votes
1 answer
Why is PynamoDB Not projecting attributes from the main table in my query results?
I've got a PynamoDB table and index mapping defined as follows:
class Id2Index(LocalSecondaryIndex):
class Meta:
projection = AllProjection()
kind = UnicodeAttribute(hash_key=True)
id2 = UnicodeAttribute(range_key=True)
class…

CryptoFool
- 21,719
- 5
- 26
- 44
0
votes
1 answer
DynamoDB query and filter based on if a set attribute contains any of the element
I have a table that looks something like the below, which contains some entity and it's ACL.
Source - PartitionKey
Neighbour - SortKey
ACL - Set of Strings
Now, say I'm given a list of permissions a user have, is there a way for me to query by…

niyruu
- 5
- 3
0
votes
0 answers
DynamoDB order a query result by attribute?
In DynamoDB is it possible to use a query to get an item collection but have the order sorted by another attribute which is not a sort key?
For example:
UserId - PartitionKey
Type - SortKey
Timestamp
Is it possible to query by user ID and get all…

niyruu
- 5
- 3
0
votes
1 answer
In DynamoDB, can GSI and LSI sort key value be updated?
In dynamoDB, can the value of the sort key be changed after the item is written to the table?
For example, I have a sort key counts, am I able to do incr updates on counts if it was being used as a sort key for GSI or LSI?
My understanding was that…

niyruu
- 5
- 3
0
votes
0 answers
DynamoDB - Enhanced API: How to query using LSI
I am new to DynamoDB. I am using DynamoDB Enhanced Client API to query items using LSI, but I am not getting the item I expected.
Test Scenario
I have 2 items in the table with same primary key (PK) and seatId (lsi sort key) is different for both…

Prasad Doradla
- 11
- 2
0
votes
2 answers
How to Minimize Read Costs using DynamoDB Global Secondary Index and Attribute Expressions?
Does using a GSI with an attribute expression reduce your read costs since you're only returning a subset of attributes from a query? Or does AWS charge you for the reading the full row and considers that they're only filtering the data for you but…

Logan
- 21
- 4
0
votes
1 answer
Using DynamoDB GSIs with Sort Keys Instead of PK
I want to create an arabic dictionary database in DynamoDB. The database is primarily read-heavy, with only occasional writes to fix errors. I have 2 types of records, roots and nouns. The primary issue is that a single word can be pronounced in…

Manaf Asif
- 19
- 3