Questions tagged [amazon-dynamodb]

Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multiregion, multimaster database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB is hosted on AWS, but also has a local deployment option just for development and functional testing.

0
votes
0answers
4 views

DynamoDB BatchWriteItem : Provided list of item keys contains duplicates

I am trying to use DynamoDB operation BatchWriteItem, wherein I want to insert multiple records into one table. This table has one partition key and one sort key. I am using AWS lambda and Go ...
0
votes
0answers
9 views

DynamoDB: When does 1MB limit for queries apply

In the docs for DynamoDB it says: In a Query operation, DynamoDB retrieves the items in sorted order, and then processes the items using KeyConditionExpression and any FilterExpression that might ...
0
votes
0answers
12 views

how do you do nested objects in graphql - i'm using appsync and dynamodb

I have the following object and I want to create a schema for it that handles nested objects - what's the best way using graphql: { "type": "product", "id": "411e2a2b-37e8-421e-...
0
votes
0answers
25 views

How to manage an AWS Dynamo DB for multiple Android apps?

I have developed a prototype of an Android application for a start-up company using Amazon Web Services, I was able to manage all the tables and billing, I have added the owner of the company as an ...
-1
votes
2answers
17 views

Amazon Web Service: DynamoDB: updateItem giving validation errors

The Problem: I'm struggling with the updateItem instruction in AWS' dynamoDB. So far as I can tell, I've written the code precisely as illustrated in the documentation and as directed by an Amazon ...
0
votes
1answer
23 views

“Truncating” a DynamoDB Table Created via CloudFormation (SAM)

I'd like to "truncate" (delete all items) in a DynamoDB table. I know that the most efficient way to do this would be to delete the table and re-create it (name, indexes, etc.). However, the table is ...
-1
votes
1answer
24 views

Server Side encryption in Dynamodb table

I was reading about the encryption at rest and found that Dynamodb by default does that. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/encryption.usagenotes.html What does it ...
-2
votes
0answers
7 views

DynamoDb query doesn't returning anything Javascript

I'm trying to query a dynamoDB database from Javascript with the following code : var ddb = new AWS.DynamoDB({apiVersion: '2012-08-10'}); console.log(this.state.userId); console.log(this.state....
0
votes
0answers
15 views

Step by step guide to integrating DynamoDB with Ruby on Rails api backend

I need help on connecting aws-DynamoDB to the backend of my project. So far I have created the rails backend API with rails new <project> --api and I have also downloaded wget https://s3-us-...
0
votes
1answer
24 views

DynamoDB update_item issue: “When calling the UpdateItem operation: The conditional request failed” (Python)

I am attempting to update an existing item in my Dynamo DB database based on 2 things: 1) extraction date and 2) item URL. However, I am receiving the "Conditional request failed" error. I have ...
0
votes
0answers
27 views

Simultaneously accessing two dynamodb tables belonging to different accounts using assume role does not work

I have a java application running in ECS in which I want to read data from table in account 1 (source_table) and write it to a table in account 2 (destination_table). I created two dynamodb clients ...
0
votes
1answer
20 views

How to debug my dynamodb insert not working

I am not able to insert an item in my dynamodb table. My code is the following: function insert() { const item = { itemId: 'itemId', name: 'itemName', ...
0
votes
1answer
22 views

How can I copy one DynamoDB table to another one, while changing the primary key in the process?

I've found some references on here that refer to copying one dynamoDB table to another, but I've had trouble finding anything that refers to changing the primary key while doing so. Basically I ...
0
votes
0answers
8 views

DynamoDBMapper for conditional Existence OR <=

I want to use the mapper to do some conditional inserts. Specifically we need to do this: attribute_not_exists(MsgTs) or MsgTs <= :messageTs Is this possible with the DynamoMapper? I get the ...
1
vote
1answer
19 views

How do I implement a DynamoDB Global Secondary Index with Infrastructure As Code in CloudFormation

I am working on implementing a GSI in CloudFormation with Infrastructure As Code. All I want to do is use this table to keep count of the entries in the main DynamoTable. Here is what the main tale ...
-2
votes
0answers
20 views

how should i design table for posts with hashtag?

I'm trying to create the SNS service which has posted content with hashtags(like twitter) uning DynamoDB. How should I design table for the SNS service with hashtags? I understand about the partition ...
0
votes
1answer
24 views

Conditional insert in Dynamodb

I am creating a leave tracker app where I want to store the user ID along with the from date and to date. I am using Amazon's DynamoDB as the database, and the user enters a leave through a custom ...
0
votes
0answers
15 views

AWS.DynamoDB.DocumentClient failing to add items on put

I am using the AWS.DynamoDB.DocumentClient, with Dynamodb local (port 8000). In my params object I have huge Item object. When I perform a put,it is breaking with Javascript heap out of memory error ...
0
votes
1answer
38 views

Amazon Connect many tables to one API with Amplify AWS IOS

I am new to amazon services AWS, and I am trying to create a database for my project (DynamoDB). I have followed the tutorial and have all installed (CLI, Amplify, etc). But when I add a new API it ...
-2
votes
1answer
11 views

Get all unique value from dynamodb table in go lang

how do i implement below sql in go lang on dynamo db . select * from MyTable t inner join ( select username, max(date) as MaxDate from MyTable group by username ) tm on t.username = tm....
-1
votes
0answers
25 views

DynamoDB: increment value in property value

I'm wondering if or how can I increment number in my value, in this example I want to increment `log/<number to increment>` with value that I'm already using as other column value (count) db....
0
votes
1answer
30 views

I don't get any kind of answer from dynamoDB

I have a problem with aws DynamoDB. I'm trying to run the next query: const docClient = new aws.DynamoDB.DocumentClient(); const params = { TableName: TABLE, Item: { CupsAndYear: CUP ...
0
votes
0answers
30 views

Make AWS Lambda call itself again after completing a task

I have an AWS Lambda function which does a couple of API calls then saves whatever information it gets to a DynamoDB table. Would it be a good practice for me send a message to an SQS queue after ...
-1
votes
0answers
16 views

Aws cannot read dynamodb data correctly

This is my dynamodb I try to pull data as a dataframe but data not comes correctly | ID|Categ|Amnt| . +---+-----+----+ . | 1| A| 10| . | 2| A| 5| . | 3| B| 56| . +---+-...
0
votes
0answers
13 views

How to make DynamoDBMapper batch operation fail for tests?

I have implemented batch delete and batch save operations. I wanted to test what actually will be present in the FailedBatch when there is an error and test it. What I need to do to make a save/delete ...
0
votes
0answers
27 views

Change from Key to Map<String, AttributeValue> throwing exceptions in Amazon DynamoDB

Recently I'm changing the code to move from version v2 to v4 of Amazon S3. While doing this change, I got to know that the Key class is no more present. And one of the post asked me to change the Key ...
0
votes
1answer
13 views

Is it okay to have a DynamoDB table with a SHA256 Key?

I'm creating a User Table on DynamoDB, and I wanted to set the primary key as a sha256 hash string of the user's email address. Is it a good idea to keep a SHA256 value as a primary key in a DynamoDB ...
0
votes
0answers
26 views

DynamoDB table design for social network

I got a thinking-problem in DynamoDB. My structure is looking as following: primary key = "id" sort key = "sort" I have posts, users and "user A following user B" relationships. Users: id=1234 ...
1
vote
0answers
23 views

Lambda Function Inconsistently Missing DynamoDB Triggers

Perhaps I have a misunderstanding of something, but I have a Lambda function that is triggered by new items being added to a DynamoDB table. My trigger is configured like so; DynamoDB Table Name: My ...
1
vote
1answer
18 views

Query a Secondary Index on DynamoDB in Golang

My primary key is a field called "id" I've added a secondary index to my table on the field "group_number" I query via the secondary index like so: // Query the secondary index queryInput := &...
0
votes
1answer
19 views

Is it good to use DynamoDB for read-only write-once data?

I got a database of my country postal code with its respective district. (https://github.com/pentagonal/Indonesia-Postal-Code/blob/master/Json/postal_array.json )(about 13 MB in JSON) Is it good to ...
0
votes
2answers
38 views

Lambdas calls speed changes

I've created a simple lambda that reads data from dynamodb. First time I call the lambda it takes about 1500ms to complete, but then after I run the lambda again it takes about 150ms. How is it ...
0
votes
1answer
23 views

Choose primary index for Global secondary index

I'm reading the AWS docs about secondary indices and I don't understand the following statement: The index key does not need to have any of the key attributes from the table From what I ...
0
votes
0answers
31 views

How to pull all tables from DynamoDB to cross account S3?

I have a use case according to which I need to pull records daily from all of the tables present in a DynamoDB instance and store them on a cross account S3. Essentially, it would be better to ...
1
vote
2answers
42 views

DynamoDB many-to-many equivalent

I want to replicate the following relations in DynamoDB A user can have many medals A medal can be granted to many users I read that you should only use a single table in DynamoDB, but I ...
0
votes
0answers
11 views

Using DynamoDbMapper with many variables, is there a way to map the variables with an array or map and maintain unique attribute names?

I am using Dyanmodb Mapper to store an item that will have the hashkey, date, and then 50+ other variables, all of which are strings, that is coming from an input JSON stream. The table will then have ...
0
votes
1answer
39 views
+50

Scan Dynamo DB with boto3 for array of dictionary

Need to scan Dynamo DB having records with list of dictionary objects. Below is my sample data 'toAddr': [{'type': 'email', 'address': '[email protected]'}, {'type': 'email', 'address': '[email protected]'}]}...
0
votes
1answer
24 views

Query dynamodb table by primary key

I'm having problems creating a simple query request. Here they show an example of how to do a query using the global secondary index. Now in this case, I just have the primary key, and I'd like to ...
0
votes
1answer
30 views

Reading CSV files from S3 in EC2 using Java

In the current implementation, I have Java code which actually reads 2 or more CSV files, combines data based on business logic and saves data into a new CSV file. This java jar file is triggered in ...
2
votes
2answers
17 views

DynamoDB | BatchGet | Get results in same order as provided Keys

I'm using AWS DynamoDB to store users. Consider the following code: let params = { RequestItems: { 'users': { Keys: [ {id: '1111'}, {id: '2222'}, {id: '3333'}, ...
0
votes
1answer
12 views

Attribute object fundName is of type <class \'boto3.dynamodb.conditions.Attr\'>. KeyConditionExpression only supports Attribute objects of type Key

I am getting the following error in python 3, boto 3 while doing a query in dynamoDB table. Attribute object fundName is of type . KeyConditionExpression only supports Attribute objects of type Key ...
0
votes
0answers
30 views

Query a table with primary key and two conditions on sort key

I'm trying to query a dynamodb table using the partition key and a sort key. The sort key is a unix date, so I want to request x partition key between these 2 dates on the sort. I am currently able ...
0
votes
0answers
25 views

AWS lambda and dynamodb pagination

Suppose I have a dynamodb table with about 1500 records and primary id called "PK". These 1500 records has a field called Name which indicate to whom the record belong to. When a user go to my website,...
0
votes
1answer
37 views

Dynamodb one bulk scan vs many single gets

Suppose I have a lambda function and as the event param I get about 50 primary ids that I have to look for inside a dynamodb table, what would be the better way to do it - 50 get queries each one by ...
1
vote
1answer
16 views

AppSync + DynamoDB: filter by owner

I'm trying to write a resolver template for a Scan that filters by owner. Here is what I tried so far (this is my request template): #set( $identityValue = $util.defaultIfNull($ctx.identity.claims....
0
votes
1answer
11 views

setup ttl based on PK

DynamoDB has a feature to allow you setup ttl based on PK+SK, I'm wondering how it support ttl only based on PK. Is it possible to setup a ttl that works on all entries of a PK? I'm currently running ...
0
votes
0answers
14 views

Get data from DynamoDB with date greater than last week

I'm trying to get data from DynamoDB with certain criteria, the idea it's to get only the userid and modules_completed last week. I can change the structure of data if you think it's better to get the ...
1
vote
1answer
26 views

How to make Marshmallow (>=3.0) treat numbers in fields.Dict() as Decimals

I have a JSON API, that has one of the fields defined as fields.Dict - the data can contain valid JSON and it's content is left to User to decide. However, there now is a problem that the user cannot ...
-1
votes
1answer
32 views

AWS platform. Picking the right technologies

I am building an app that allows people to share items with other people in the community. I wanted to use AWS as my platform. My idea was to use react Native for the app. AWS Cognito for the ...
0
votes
0answers
14 views

Append value to a list in DynamoDb when there is race condition

I want to append value to the list in dynamo db, but how do i append value when there is race condition. I know I can prevent update by using version number but I don't want to prevent the update ...