Questions tagged [dynamodb-mapper]
42 questions
5
votes
1 answer
What is the difference between DynamoDBMapper and Table for DynamoDB Tables
In AWS DynamoDB, There are two options available to do the CRUD operations on the Table.
DynamoDBMapper :
com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper;.
AmazonDynamoDB dbClient =…

Lenzman
- 1,177
- 18
- 30
3
votes
1 answer
i was getting this error "not supported; requires @DynamoDBTyped or @DynamoDBTypeConverted" when i tried to run the below code
when i tried to run the code using put on this entity. i was getting the error as @DynamoDBTyped or @DynamoDBTypeConverted but i can retrieve the data from the databse using get and delete without any issue, i think the issue is something with the…

sai chand
- 31
- 2
2
votes
2 answers
How to create a size condition useing AWS dynamodb-mapper-js
I am trying to use the AWS Dynamodb Mapper library with Typescript to update an item in a table depending on the size of an array element (lets call it IDs) of the table.
An issue in the Github repo has been raised for this:
According to the…

Shafique Jamal
- 1,550
- 3
- 21
- 45
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
Does dynamodb supports atomic counter on SET operation if value is not exists?
I have a use case where I need to store how many people view the blog post in DynamoDB.
Lets' say I have a table like below
blogId
Total Views.
1
100
Now when a user views a new blog with ID 2 I have to store that in the table. I can do…

Hari
- 1,545
- 1
- 22
- 45
2
votes
0 answers
What does the UPDATE config for the DynamoDBMapper imply?
According to the DynamoDBMapper documentation in the AWS Java SDK, the save method of the DynamoDBMapper class, takes a config (of DynamoDBMapperConfig type) as one of the inputs.
In the documentation (link) the following has been provided as the…

Aditya
- 397
- 2
- 12
2
votes
0 answers
Is there a way to update a nested attribute in DynamoDB using DynamoDB Mapper
I have a DynamoDB Schema with nested attributes. Hence lets say below is my mapper structure.
public class Test
{
@DynamoDBHashKey private String testPk;
@DynamoDBRangeKey private String testSk;
@DynamoDBAttribute private String…

Radioactive
- 611
- 1
- 11
- 20
2
votes
1 answer
How to get one Item by searching from non-key attribute in DynamoDB?
I have a table in DynamoDB and have partition key and a sort key. For example, the table structure is as follows.
// Primary Keys
id -> PK
name -> SK
Info -> json Formatted Attributes
So let's say there are two items in the table,
// Item 1
{
…

Abraham Arnold
- 301
- 4
- 20
2
votes
1 answer
DynamoDBTypeConverter not working as expected
First, the code that runs correctly:
The content in DynamoDB table is :
"test_field" : "x:x:x"
Entity POJO has:
@DynamoDBTypeConverted(converter = SingleFieldConverter.class)
@DynamoDBAttribute(attributeName = "test_field")
private SingleField…

bobjan
- 353
- 1
- 4
- 11
1
vote
0 answers
Apply different AttributeTransformers for tables involved in DynamoDB transaction
Is there any way to use different AttributeTransformers for various tables involved in a ddb transaction. I looked at DynamoDBMapper code, it looks like the same transformers are applied to all the operations. Is there any ready-made solution to use…

Rohit Lakhotia
- 115
- 1
- 6
1
vote
1 answer
DynamoDBMapper updateItem expression
I'm using DynamoDBMapper as an abstraction over dynamodb operations in java.
I need to perform an update item within a transaction that depends on the current value (i.e. I need to decrement an account balance). While I know how to do this with the…

Connor Butch
- 648
- 1
- 10
- 28
1
vote
2 answers
Polling items from DynamoDB
AWS newbie here.
I have a DynamoDB table and 2+ nodes of Java apps reading/writing from/to it. My use case is as follow: the app should fetch N numbers of items every X seconds based on a timestamp, process them, then remove them from the DB.…

Kamil Kozlowski
- 66
- 5
1
vote
0 answers
DynamoDBTypeConvertedJson for an abstract class
Say my classes are structured as follows:
abstract class A {
}
class B extends A {
String attOfB;
}
class C extends A {
String attOfC;
}
Then, can my DynamoDB mapper class use A with…

Vegan Vegeta
- 47
- 4
1
vote
0 answers
Quarkus and DynamoDBMapper - Failing to build a native executable - Error Random/SplittableRandom
I've got a Quarkus project where DynamoDBMapper is also being used. Everything runs perfectly in dev mode.
But when running this command mvn package -Pnative -pl my-module -DskipTests it gives me this error
[my-module-1.0-SNAPSHOT-runner:61] …

bob
- 198
- 1
- 10
1
vote
0 answers
Best method to Batch Update existing DynamoDb items using DynamoDb mapper
I am trying to find the best way to batch update items in a DynamoDb table using Java’s Dynamo db mapper. Is DynamoDBSaveExpression the right way to do it? Can I use DynamoDBSaveExpression to batch update (batchSave()) items based on a condition or…

Samarth
- 242
- 2
- 12