Questions tagged [dynamodb-queries]

Use when content is about querying or scanning Amazon DynamoDB managed database.

1232 questions
-1
votes
1 answer

Is having high cardinality more important than even access when trying to avoid hot partitioning?

I'm designing a database schema where there are only 2 partition keys, however, both partitions will be accessed equally - every time I access partition A, I will also access partition B. Will this design suffer from hot partitioning? From my…
-1
votes
1 answer

Deleting Item Within Item in DynamoDB with Java

There is documentation given by AWS on how to delete an item within a table. However, I'm not trying to delete the entire item; I'm only trying to delete a few rows within the item. Let's say I have this item in a DynamoDB table (the same example…
-1
votes
1 answer

Find largest partition in Dynamo DB

I am new in Dynamo and I have a table that is partitioned by company id and receives news everyday related to the companies, so I just insert a new record for every news that I got using the respective company id. I would like to know if there is an…
dduque
  • 338
  • 4
  • 16
-1
votes
1 answer

AWS Lambda To DynamoDB

I am trying to connect my front-end, via a lambda function, to DynamoDB. I cannot understand how to fix the lambda function for it to work. Currently it is just posting undefined to PK and SK. Lambda Function "use…
-1
votes
1 answer

Conditional expression on putItem

i am trying to check if key exist on table before making putItem operation on dynamodb to prevent overriding existing key value
-1
votes
1 answer

Update Item in DynamoDB from CLI

I try to update one item from DynamoDb CLI but I am getting error aws dynamodb update-item \ --table-name test \ --key '{"testid": {"S": "testing"}}' \ --update-expression "SET userType = :ut" \ --expression-attribute-values …
user13000875
  • 387
  • 2
  • 14
-1
votes
1 answer

how to update a value in dynamodb table based on condition using python and boto3?

I want to update the below current_date value in dynamodb (last_run_date) column based on following conditions: current_date = datetime.today().strftime('%Y-%m-%d %H:%M:%S') conditions: kpi_id = KPI038 metric_id = 'NA' Table name:…
Mahilan
  • 153
  • 1
  • 9
-1
votes
1 answer

DynamoDB BatchGetItemRequest without providing Primary Key

AWS DynamoDB table has : Client (Primary Key), folder_location (non-key attribute), script_name (non-key attribute) I want to retrieve records using Client and folder_location attributes using BatchGetItemRequest. But getting below error: Failed…
-1
votes
1 answer

Update attributes of DynamoDB table item

While defining my DynamoDB table, I selected filename as the unique attribute or primary key. In this function, I want to modify some columns of the entry with a particular filename. I tried this after following another SO answer: def…
user13067694
-1
votes
1 answer

How should like a structure on dynamodb? Using nested structure is correct?

The same question is like in the topic. When using AWS documentation, they recommend that you keep your related data in one table. But reading the various comments from other users, for the most part, I saw not to use nested objects (list of maps).…
-1
votes
1 answer

Get data based on sort index AWS dynamoDB

I have a DynamoDB table like this: I want to list all posts irrespective of users, i-e by getting all data whose sort key is "post". How can I achieve this? I have heard about Global Secondary Index, but couldn't figure out how to use them.
-1
votes
1 answer

How To sort data in dynamodb with boto3 and get results with greatest values?

I have a Books table and I want to fetch 5 most expensive books! like we do in MySQL: SELECT * FROM (SELECT * FROM Books ORDER BY Price DESC) Books LIMIT 5
Ali Muhammad
  • 159
  • 2
  • 11
-1
votes
1 answer

How to correctly structure a DynamoDB table for sorting results with no hash key condition?

I am new to DynamoDB so I'm still trying to understand how to use it, but I have what I believe is a simple task but I'm not sure how to address it. I need to create a table to store categorized questions in which I need to store a click counter. So…
Damil
  • 97
  • 1
  • 5
-1
votes
1 answer

Scan DynamoDB attribute which is a cron string and filter based on current time

I have a DynamoDB table with the following items { "jobId":, "cron" : "* 5 * * *" }, { "jobId":, "cron" : "* 8 * * *" } I need to scan items who next execution time based on cron string is within the next 5 minutes, based on…
Deesha
  • 538
  • 8
  • 27
-1
votes
1 answer

Is possible to use regex in Sort Key on a on dynamodb query?

I want to make a query like this. val dynamoDB = DynamoDB(dynamoDBConfig.amazonDynamoDB()) val table: Table = dynamoDB.getTable("music") val spec = QuerySpec() .withKeyConditionExpression("artist = :_artist and begins_with(title,…