Questions tagged [amazon-dynamodb-index]
251 questions
0
votes
1 answer
Facing issue while writing Java Integration Tests due to GSI (dynamoDB)
I've a dynamo table in on which I've configured a Global Secondary Index.
tripID -> Partition Key
userId -> Range Key
dateScheduledAt -> Partition Key of the GSI
timeScheduledAt -> Range Key of the GSI
I've written a method in my code which queries…

Heisenberg
- 17
- 6
0
votes
1 answer
dynamodb GSI index is emtpy
I have a dynamodb table with pk = userID (String) sk = ServiceID (String),
also i have a gsi ClusterID-createdAt-index where pk is ClusterID (String) and the sort key is createdAt (Number)
{
"Table": {
"AttributeDefinitions": [
…

Alexander Shitikov
- 75
- 8
0
votes
0 answers
Querying GSI in batches rather than individual requests
I am having close to 200K eventids in a csv. I am reading each one of them in a loop and using GSI to query those eventids. GSI is on the attribute eventid on the main table. Is there a way that I can send these eventids in a single batch or single…

ghostrider
- 2,046
- 3
- 23
- 46
0
votes
1 answer
Dynamodb efficient query on list
I m porting a CosmosDB data model to DynamoDB. The objects look like that:
{ pk: "mypk", id: "myid", keywords: [ "lac", "sun", "nature" ] }
In CosmosDB I can make a query to the items of the list and hit an index, resulting in a fast and efficient…

fred_
- 1,486
- 1
- 19
- 31
0
votes
1 answer
Count of rows in DB with particular field value using GSI
So I have below rows in DynamoDB with example data. I want to find out the count in below format which means given a file name as input, output should be the number of events of that file present in the DB. Currently I have created a GSI on eventId…

ghostrider
- 2,046
- 3
- 23
- 46
0
votes
1 answer
How does one create a GSI for an Item in a Array in DyanmoDB?
I have a DyanmmoDB table that has:
Partition key: State (IE: two letter State ID)
Sort Key: City (Name of city in the state)
Items in the "record" is an array, let's say Advertisements
"StateShort": "AK",
"City": "Anchorage",
"Ads": [
{
…

wilmsoft
- 3
- 3
0
votes
1 answer
How to find latest record enter in DynamoDB
Getting Below Error:
{
"errorMessage": "name 'Emp_id' is not defined",
"errorType": "NameError",
"requestId": "4b66e8ca-28f8-4005-8589-3993d2d4d203",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 12, in lambda_handler\n …

Arun Kumar
- 1
- 1
0
votes
1 answer
How to avoid scan operation in dynamodb
Post table
{
...otherPostFields,
tags: string[]
}
User table
{
...otherUserFields,
tags: string[]
}
I am trying to make a feed
I am first fetching User to get the tags
I don't want to use scan since its very expensive as it goes through all the…

Voxelli
- 126
- 4
0
votes
2 answers
dynamodb query: ValidationException: The number of conditions on the keys is invalid
I have the following schema where I am basically just trying to have a table with id as primary key, and both code and secondCode to be global secondary indexes to use to query the table.
resource "aws_dynamodb_table" "myDb" {
name =…

AngularDebutant
- 1,436
- 5
- 19
- 41
0
votes
2 answers
How can I fix the error "DynamoDB returns GSI range key not specified errors"?
I have a cloudformation template regarding the dynamodb. I added new index called customerId-index as below:
ComponentsTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.base}-components
…

Onur
- 414
- 1
- 11
- 31
0
votes
1 answer
Update GSI of DynamoDB, old data not update in new GSI
I have one table, name is Ticket
Ticket {
id,
usage,
affiliationOrganization
createdAt,
....
}
GSI1:
PartionKey: usage
SortKey: affiliationOrganization
After a development time, i want update SortKey of GSI1
PartionKey: usage
SortKey:…

TuanVM
- 1
0
votes
1 answer
what is the most efficient way to update bulk data inside DynamoDB rather than scan and query
I've got a table containing loads of category keys. I want to update some of these categories by a bulk request(e.g. update key#1, key#3 ) and the table schema is as follows:
PK
SK
key#1
name#1
key#2
name#2
key#4
name#4
as you can…

Pouyan
- 15
- 5
0
votes
1 answer
Dynamodb range query on timestamp
We have a DDB with a column : Timestamp (string)
Essentially we need to query data between a range of the Timestamp column.
What is the best way to do this?
I tried creating a GSI in my test environment using the Timestamp column but quickly…

Amby
- 21
- 2
- 8
0
votes
0 answers
"Internal server error" "HttpErrorResponse"
I'm trying to scan the table and show only few data which equals to cognitoUserName.
Basically the table contains multiple user data. I need to show data of only the logged in user.
Like user specific data.
So I have used field userName in which the…

hari5udhan
- 1
- 1
0
votes
0 answers
QueryConditional with Contains Support in dynamoDB
I am looking to query over lsi index on one of my dynamo DB table -
Format of lsi -
OFFER#{DateTime in YYYYMMDDHHMMSS }#{OFFER_TYPE}
I do have OFFER_TYPE with me and want all results in sorted order ( based on dateTime ) . Using scanIndexForward…

Sajal Saxena
- 191
- 1
- 3
- 16