Questions tagged [amazon-dynamodb-index]
251 questions
0
votes
1 answer
How can you find an entity in DynamoDB sorted by a date attribute
Given an entity identified by id (i.e. a user, a device, etc.) which is used as the hash key of a table, and an additional date attribute (i.e. last modified, last login etc). I would like to be able to find the eldest entry in that table.
A typical…

reikje
- 2,850
- 2
- 24
- 44
0
votes
1 answer
DynamoDB and Serverless: not authorized to perform: dynamodb:Query on resource
I'm getting this error:
"message": "User: arn:aws:sts::XXXXX:assumed-role/lambda-my-account-dev-us-east-2-lambdaRole/lambda-my-account-dev-my-account is not authorized to perform: dynamodb:Query on resource:…

pmiranda
- 7,602
- 14
- 72
- 155
0
votes
1 answer
Querying DynamoDb timestamp data in range
I want to migrate my data from DynamoDb to Redshift. I dont want to scan the whole table at once as this might result in throttling.
My Table is as below:
acountId(hash key), lastUpdatedTime.
I thought I can create GSI on lastUpdatedTime and then I…

Amit jha
- 7
- 1
- 6
0
votes
1 answer
DynamoDB intersection select with pagination
I have following DB schema and I'd like to find the best way how to select list of Sorted keys which are common for PK_A and PK_B:
+---------------+---------+
| PK | SortKey |
+---------------+---------+
| | SK_A |
| PK_A…

Alex
- 1,940
- 2
- 18
- 36
0
votes
1 answer
DateTime as String in DynamoDB, How will it work keeping the DateTime attribute as range key?
I'm new to DynamoDB, in our application the access pattern would be something like, display all Orders recently been created. Hence I decided to keep the createdDateTime attribute as range key, while doing data modeling in DynamoDB. Also I've seen…

Harish
- 112
- 2
- 14
0
votes
1 answer
How to create dynamo db item without specifying gsi key
I am working with a dynamo db table that uses a gsi so I can query via an additional attribute, if it is present. This attribute will be updated in a process so all of the items do not have this attribute in the beginning of the process. This…

Eve Edomenko
- 421
- 1
- 3
- 13
0
votes
1 answer
AWS DynamoDB Multi-Tenant Table Schema
Thanks in advance!
I want to ceate a Saas solution using AWS for multiple tenants each having multiple users.
Each of the user (Example : Admin, Manager, Supervisor) have to upload their department users data (Eg: Name, SurName, Email, Phone etc.…

user1393608
- 1,299
- 3
- 16
- 29
0
votes
1 answer
DynamoDB single query to retrieve both public and private chat messages
Need some suggestions in choosing DynamoDB partition key and sort key to retrieve all public and private messages in a chat.
In the same chat room, users can send public messages and also private messages to specific people.
DynamoDB model:
For…

Abie
- 81
- 5
0
votes
0 answers
unique id for each item in dynamodb
I'm using dynamodb and I'm trying to set a different unique value ( id ) for each item I create in a table.
While looking for a solution I find the "atomic counter" solution and in the docs of aws there is an example here ( Increment an Atomic…

Gianmarco
- 792
- 2
- 14
- 38
0
votes
1 answer
is it good idea to use a binary attribute for GSI indexing in dynamo DB?
I have one attribute in my DynamoDB table which will take binary values success and failure.
can I do GSI indexing on this attribute if i have to fetch/query either success or failure records from this table?
or should i make two different table…

Akash Patel
- 189
- 1
- 5
- 13
0
votes
1 answer
How to get highest value of Range key in DynamoDB when range key is version number?
I have created one service X where accounting requests with some data comes from many other services Y. I create one idempotent_id from this data by adding many attributes so that this idempotent_id remains unique.
I also create one…

Akash Patel
- 189
- 1
- 5
- 13
0
votes
0 answers
Associate 2 tables on dynamodb that allows pagination
:)
I recently started working with aws platform, and i'm having a hard time developing one thing.
Basically i want to link two different dynamodb tables( like company table and orders table), and one company can have different orders connected to…

hiun
- 21
- 5
0
votes
1 answer
query dynamoDB for values between X an Y
I have a DynamoDB table like depicted in the attached image and I'm looking for ways to query the table based on lon and lat fields. More specifically, I'm looking for all the results with Lon between X and Y and Lat between A and B.
Is there any…

Benoit Morel
- 23
- 1
- 10
0
votes
1 answer
Update Dynamo DB column based on GSI
I have created a table TEST which has 4 columns:
column1 : Range key
column2: Sort key
column3: GSI
column4: normal attribute
Now I want to update value of column4 based on GSI value. I tried with the following code but it works only when I pass…

priyadhingra19
- 333
- 4
- 15
0
votes
0 answers
Ensuring single active item in dynamodb
I have the following table:
attribute 1
attribute 2
attribute 3
attribute 4 -> de-dupe key
attribute 5 ->state
UUID.
And a service built on top of this for CRUD.
The initial state of the item is 'active'. If the CRUD API createItem is called, I…

user7365614
- 469
- 2
- 4
- 14