Use when content is about querying or scanning Amazon DynamoDB managed database.
Questions tagged [dynamodb-queries]
1232 questions
2
votes
1 answer
DynamoDB GSI using boolean like a hash key
It's just a doubt that i cant find on the internet.
I have a table like this:
| id | infos | ignored |
| 1 | abc | true |
| 2 | def | false |
| 3 | ghi | false |
I see i cant create a DynamoDB GSI on booleans…

Rafael de Carvalho
- 501
- 1
- 5
- 10
2
votes
3 answers
Fetch last item of the aws dynamodb table
So I wanted to fetch the last item/row of my dynamodb table but i am not finding resources. My primary key is id having series of incremented numbers such as 1,2,3... for each row respectively.
This is my function.
async function readMessage(){
…

md shoaib
- 125
- 1
- 10
2
votes
1 answer
DynamoDB - Get Item by Global Secondary Index
I have an existing table which has 10 fields. Fields are like this:
AuthID, UserID, Age, Job, .etc
The table stores data of my users. "AuthID" is primary key and "UserID" is a Global Secondary Index.
When I get item by AuthID, everything is fine.…

Yusuf Demir
- 57
- 6
2
votes
0 answers
Many-to-Many Dynamic Data DynamoDB
So I have this table. I have place and users. Users have history of visited places.
Simple question.
How do I get user data and all up-to-date place data without doing 2 database calls.
In my second item I would need to do duplication of a place,…

Djordje Nikolic
- 343
- 6
- 12
2
votes
1 answer
How to use multiple filter expressions in AppSync resolver
I can't for the life of me figure out how to have two different filter expressions in my Appsync resolver. I'm trying to retrieve the ID based on the two other pieces of data, email and username.
Here's how my resolver looks like:
{
"version" :…

Maxime Franchot
- 1,015
- 1
- 10
- 24
2
votes
1 answer
How to achieve sorting by any attribute of an item in DynamoDB
I have a DynamoDB structure as following.
I have patients with patient information stored in its documents.
I have claims with claim information stored in its documents.
I have payments with payment information stored in its documents.
Every claim…

I.K.
- 414
- 6
- 18
2
votes
2 answers
How to update multiple items with single key value in dynamodb?
I am trying to update the items in the Dynamodb table. But I am facing a problem so how can I update multiple rows with one key value.
Condition:
set isActive=False where systemId='si11'
+-------------------+----------+----------+
|…

raval-64
- 83
- 2
- 10
2
votes
1 answer
How do I limit the number of results from context.Query in DynamoDB in .NET
I'm trying to limit then number of items returned by DynamoDB while querying a table. I need only the first matching result.
The goal is reduce the number of read units consumed and in an effort to keep the code readable I'm using context.Query to…

rboy
- 2,018
- 1
- 23
- 35
2
votes
0 answers
DynamoDB Query ISO date
I'm new to Dynamo and have been trying to query the DB for a range.
I'm doing a query for an ISO date string in my Lambda like this:
const start = event['queryStringParameters']['startDate'];
const end =…

Jim from Princeton
- 721
- 1
- 9
- 19
2
votes
1 answer
DynamoDB: filter and sort the same field?
I have a table with Local Index like below.
how to make a query like startDate < InvoiceDate < endDate and sort the result descending by InvoiceDateLocalIndex ??
as far as I know, to sort the result I need to using InvoiceDateLocalIndex. But if I'd…

luan hdwebsoft
- 35
- 4
2
votes
0 answers
Scan in array of Nested Objects - DynamoDB
So, i am trying to filter objects inside of an array using dynamo db.
This is my sample object
client: {
"name":"etc"
"subscriptions": [
{
"status": "canceled"
... other fields
},
{
"status": "active"
... other fields…

Vitor Kern
- 21
- 1
2
votes
1 answer
How to retrieve all the item from DynamoDB using boto3?
I want to retrieve all the items from my table without specifying any particular parameter, I can do it using Key Pair, but want to get all items. How to do it?
import boto3
dynamodb = boto3.resource('dynamodb')
table =…

LoGan
- 97
- 4
- 13
2
votes
1 answer
How to query a table in DynamoDB using KeyConditions and using AWS-JS-SDK
I am trying to query from a dummy table I created manually.
Table name: myTable
Primary partition key: id (String)
Primary sort key: ts (Number)
The table has the following items:
id | ts | humidity | temperature
outTopic | 1233 | 50 | 30
outTopic…

Marsstar
- 159
- 4
- 10
2
votes
1 answer
GET request with query parameters returns 403 error (signature does not match) - AWS Amplify
Problem
I was trying to use 'aws-amplify' GET API request with query parameters on the client side, but it turned out to be Request failed with status code 403, and the response showed:
"message":"The request signature we calculated does not match…

Aso Sun
- 21
- 3
2
votes
1 answer
If you run a scan on DynamoDB with an AttributesToGet argument are you charged for the data footprint of every item or just the requested attributes?
Suppose you run the following code on a table with 1,000 items that are 400KB in size, and suppose that the attribute name for 'column1' + the actual data are 10 bytes:
import boto3
def get_column_1_items():
dynamodb =…

James Shapiro
- 4,805
- 3
- 31
- 46