Use when content is about querying or scanning Amazon DynamoDB managed database.
Questions tagged [dynamodb-queries]
1232 questions
2
votes
2 answers
pynamodb last_evaluated_key always return null
I'm using Pynamodb for interacting with dynamodb.
However, last_evaluated_key always returns null even if there are multiple items.
When I run this query
results = RecruiterProfileModel.profile_index.query(
hash_key=UserEnum.RECRUITER,
…

Koushik Das
- 9,678
- 3
- 51
- 50
2
votes
2 answers
Return fixed number of items from dynamo db query with filter expression
I am trying to retrieve a fixed number(lets take it as 5 for now) of items from a dynamo db table.
This is the code I am using.
response = table.query(
KeyConditionExpression=Key('pk').eq('goo'),
…

faisal
- 79
- 6
2
votes
2 answers
Multiple DynamoDB(PynamoDB) Queries with FastAPI endpoint raising BrokenResourceError
I'm trying to make multiple queries within one API request. I'm finding that I can make 1 query with no issues but when I try and do multiple within the same request I end up with a BrokenResourceError. I do get the return value to be what I want…

Sitruc
- 31
- 4
2
votes
1 answer
How to unmarshal map[string]*dynamodb.AttributeValue?
I am querying a DynamoDB table and need to UnmarshalMap i.e. query output.
The record in a table is JSON.
[{"movie":"Joker","year":"2019"}]
Or something like this
[{"movie":"Joker","year":"2019"}, {"movie":"Cruella","year":"2021"}]
type Movies…

hmdevno
- 99
- 5
2
votes
1 answer
AWS DynamoDB Attribute Names containing Spaces
I have an AWS DynamoDB table that is populated via a Lambda script triggered by a web form.
The table ends up with Attribute Names like "Full Name" and "Phone Number".
From the aws CLI in PowerShell I can run:
aws dynamodb scan --table-name…

Sherman Horton
- 23
- 2
2
votes
0 answers
Query a large list of partition ids in dynamo db where partition key is unique
I am new to dynamo db.
The table looks like below
| id |rangekey |timestamp |dimensions
| -----| --------|-------------|----------
| of1 | ACTIVE |1631460979529|{"type":"test","content":"abc"}
| of2 | ACTIVE …

Aishwarya Kalburgi
- 21
- 1
2
votes
1 answer
Error about duplicate ExecutionAttributes when calling a query using the DynamoDB AWS SDK for Java
I'm creating a Springboot microservice that is attempting to query a table stored in DynamoDB, I can get the table and its contents just fine using the AWS CLI, however when I try to do it through my micro service using IntelliJ, I receive this…

Humid-IDE
- 21
- 4
2
votes
2 answers
Removing data types from dynamodb in StepFunctions
I am using StepFunctions query to get list of items in response and then pass response to parallel state and in parallel use map to do send SQS and update item. My Stepfunction flow looks like following
My issue is query response includes data…

J.S
- 139
- 2
- 5
2
votes
0 answers
What can be an alternative of Elastic Search + DynamoDB being used in combination?
I am new to DynamoDB and I am looking for suggestions / recommendations. There's a use case where we have a paginated API and we have to search for multiple values of an indexed attribute. Since DynamoDB allows only one value to be searched for an…

Siddhant Bagga
- 23
- 5
2
votes
1 answer
DynamoDbException: Too many decomposed read operations for a given query
When using a PartiQL query which looks like this:
SELECT * FROM my_table WHERE my_field IN [1, 2, 3...]
I received this error which I can't find anywhere in Google and doesn't tell me anything about how to resolve the problem:
DynamoDbException: Too…

Alex
- 7,639
- 3
- 45
- 58
2
votes
2 answers
Query all users in DynamoDB with a single-table design
I have a simple single-table design that I want to keep flexible for the future, I currently have 2 entity types: users and videos. Users have a 1:n relationship to videos.
The table's partition key is pk and sort key is sk.
Users: pk=u# and…

PGT
- 1,468
- 20
- 34
2
votes
1 answer
boto3 KeyConditionExpression on both partition and sort key
So i have the following schema:
domain (partition key)
time_stamp (sort key)
I am (attempting) to use boto to query dynamo. I want to return all records with a given domain, after a given time_stamp.
I have tried a couple of different approaches to…

Matthew D'vertola
- 185
- 6
2
votes
1 answer
Problems to query last entry in DynamoDB - Always endup with NULL
I am a beginner in AWS DynamoDb and am stuck now. I am writing a Lambda Function in node.js to query items from DynamoDb. DeviceID is the Partition Key. The idea is to query the last entry. The challenge is that I always have a “null”…

Miguel Gil
- 23
- 2
2
votes
1 answer
DynamoDBMapper on a table containing multiple Java types
I have a single DynamoDB table which contains more than one type of Logical Entity. My table stores "Employees" and "Organizations" and creates a many-to-many relationship between the two of them.
I am struggling with how to use DynamoDBMapper to…

Duke Silver
- 1,539
- 1
- 17
- 24
2
votes
1 answer
PynamoDB - Query or count all items on table
Using PynamoDB, anyone else having issues trying to count all items on table? i have a model that i created a table from.
I'm trying to use ModelName.count() but i keep getting 0 even though i have some items there.
When sending a specific key to…

Ofek Feller
- 23
- 4