Questions tagged [dynamodb-queries]

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

1232 questions
-1
votes
1 answer

AWS Lambda Function to Retrieve Item From DynamoDB Table Using Either Scan or Query

My intention is to write a Lambda function that retrieves the specified item from the DynamoDB table using either Scan or Query (which ever works). This is invoked using a REST post request. In my current version of my Lambda function, I am able to…
-1
votes
1 answer

How to query on GSI and partition Key with boto3 dynamo DB?

I have to query a dynamoDB table with boto3 by using the GSI and the PK, my GSI is a date and I need to get the latest date, but i don't know how to query on GSI and on the PK... My code if pk_id: self.__logger.info(f"DynamoDB : get current…
-1
votes
1 answer

Match non-partitionKey fields (in nested json) in both tables and retrieve data in DynamoDB table

I have 2 tables, with 1 matching data in which I want to utilize that as a matching field and retrieve some data. First table is this: { "mainFieldName": { "S": "someString" }, "fieldA": { "L": [ { …
unacorn
  • 827
  • 10
  • 27
-1
votes
1 answer

How to fetch all items from dynamo db without scan in lambda function

I'm trying to fetch all items from dynamoDB table, But issue is administrator has not added permission of Scan in roles assigned to me, is there any alternative to scan method, I looked into aws wrangler library but aws wrangler does not have any…
-1
votes
1 answer

AWS CLI - Extracting the result of a dynamodb query to csv file

I'm having an error when I run a command to extract data to a csv file, using the AWS CLI with jq. Command: aws dynamodb scan --table-name MyTable --select ALL_ATTRIBUTES --page-size 500 --max-items 100000 --output json --profile production | jq -r…
-1
votes
1 answer

why I am getting this error: One or more parameter values were invalid: Missing the key Id in the item?

when I am trying to post the data I am getting this error; One or more parameter values were invalid: Missing the key nineId in the item This is the code. const express = require('express'); const router = express.Router(); const AWS =…
-1
votes
1 answer

How to match text in DynamoDB table through python(looking for something similar to regex)?

response = ddb.get_item( TableName = table, Key={ 'col_name': {'S': 'a'} } ) I understand that the above code will return items from the table in which the column contains 'a'. However, I am looking to query in such a way that if the column…
-1
votes
1 answer

Dynamodb adding to a list if the item already does not exists in that list

I want to add a item in a attribute which is a list, if that item does not already exists in the list of that attribute. Is there any way I can write the same in UPDATEEXPRESSION? I need below like result the order of item does not…
-1
votes
1 answer

Fetch first five items from nested map DynamoDB NodeJS

I have an object in a table like the following { key: "apple", owners: { "Adam": "some info", "Eve": "some info", "Samuel": "some info"} } I want to be able to fetch the first five owners of the item with the key…
-1
votes
1 answer

Is it possible to create GSI on 2billion items in DynamoDB

Is it possible to create 2 Global Secondary Index in DynamoDB table which has 2Billion items in it. What would be the time consumed to create these indexes
-1
votes
1 answer

How to query with multiple conditions, limit and order by in DynamoDB?

So I have a table with the following data: id business_id credit name owes partner_id type_id updated 45b4bvfdghfghbdgfgfhbdfghbdbbfg 435634652 0 FORL 55 69992528 3 …
-1
votes
1 answer

DynamoDB search

I am working on an application, in which it is required to provide a search on the data in DynamoDB. To be more clear lets say a user type "order" in search box, then it is required to check on "Pk","sk","columns" list of map (columns ->…
robo98
  • 37
  • 8
-1
votes
1 answer

How to ORDER BY a query in DynamoDB using PartiQL?

There are some answers in some forums about this question where people are generally repeating the already confusing AWS documentation about DynamoDB, but I need an example to see how it actually works. I have this query : SELECT id, message,…
-1
votes
1 answer

Column value of one table should be column headings when query is executed

I have two tables: pet type Id TypeB 1 dog 2 cat 3 snake Then another owners Ownerid Pettype 001 1 002 2 003 3 004 0 I am trying to get the values those owners who have pets as in this…
-1
votes
1 answer

Dynamo DB queries on Secondary Index

I have a use case where I am fetching data on certain items (unique itemID) multiple times a day (identified by day_BatchTime) and storing them in DyanmoDB. My composite primary key consists of itemID & day_BatchTime. I have set itemID as partition…