Questions tagged [aws-java-sdk-dynamodb]

25 questions
10
votes
1 answer

Unmarshalling DynamoDB Map to document-style JSON in AWS Java SDK 2.x

The answers to the question Converting DynamoDB JSON to Standard JSON with Java are obsolete in 2022. The problem is that both of these imports no longer work: import com.amazonaws.services.dynamodbv2.document.internal.InternalUtils; import…
Alex R
  • 11,364
  • 15
  • 100
  • 180
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 =…
5
votes
1 answer

CRUD repository bean not found exception

I have an application which connects to AWS DynamoDB. I am trying to implement Redis connection using Jedis into this application. However, just after I add this dependency - org.springframework.boot
4
votes
1 answer

Numeric limit & offset based pagination in DynamoDB (Java)

I want to implement numeric limit and offset based pagination in DynamoDB similar to Postgres. My API look something like this: http://foo.bar/user?offset=50&limit=20. What's the best way to do this in Java without risking OutOfMemoryError…
gerrytan
  • 40,313
  • 9
  • 84
  • 99
3
votes
2 answers

Querying a Global Secondary Index of a DynamoDB table without using the partition key

I have a DynamoDB table with partition key as userID and no sort key. The table also has a timestamp attribute in each item. I wanted to retrieve all the items having a timestamp in the specified range (regardless of userID i.e. ranging across all…
2
votes
1 answer

How to pass aws dynamodb table name dynamically using @DynamoDbTable annotation

I have created a java service to get the details from dynamodb it is working fine but my challenge is i hardcoded the table name to the class file @DynamoDbTable annotation in order to work with different environments i feel it is not the right way.…
2
votes
0 answers

Rollback all transactions if one transaction throws error in dynamoDB

I'm new to dynamoDB and currently trying to develop a module which writes into the dynamoDB database using transactWrite. Transactions are only allowed for a batch of 25 items but I want to add 500 items in the database in a All-or-none basis. I'm…
2
votes
0 answers

Overriding default SdkClientOption.SCHEDULED_EXECUTOR_SERVICE in AWS SDK for Java 2

Is there a way I can override the default SdkClientOption.SCHEDULED_EXECUTOR_SERVICE in AWS SDK for Java 2? I want to get rid of all the threadpools that are opaque to the application, and ensure that the threadpools are reused across all…
2
votes
1 answer

Push data from Dynamo DB to elasticsearch using java

Hi i have created a handler in java for getting the events from dynamo DB Here is my code package com.Lambda.dynamodb; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.LambdaLogger; import…
1
vote
1 answer

Wrapping CompletableFuture to Mono with DynamoDb

I know the java DynamoDB's SDK is considered async non blocking but my question is: Q. Does the dynamo update still need to be on another thread with operator publishOn to be safer in a reactive context? Mono.fromFuture(table.update()).publishOn();
M_K
  • 3,247
  • 6
  • 30
  • 47
1
vote
1 answer

Can't convert Map (DynamoDB) to POJO if use annotation @Builder

I'm trying convert Map to POJO. I do it like that: new DynamoDBMapper(awsConfiguration.amazonDynamoDbClient()).marshallIntoObject(MyClass.class, myMap); @DynamoDBTable(tableName = "myClass") @Data public class MyClass{ …
1
vote
1 answer

Upload Files To S3 from Browser and Secure AWS Creds

i am developing a small application in ASP.net MVC ,in which i am uploading file to s3 directly from browser ,below is my code , but the problem is since it is in JavaScript my Access key and Secret key is expose , is there any way i can hide it or…
1
vote
2 answers

Query More Than 100 DynamoDB Items that match a Partition Key using Java SDK 2?

How can more than 100 items from a dynamodb table, matching a particular partition key, be queried using aws java sdk 2? If the number of rows that match a hash key exceeds 100 then the batchGetItemPaginator method needs to be used. This method…
1
vote
1 answer

AWS DynamoDB Partition Key Lock Implementation in Java

I am running same application with two different ports in my local. The code I have provided is only for testing. Here access_key and secret_key will be provided from environment variables in later stage. When I run same application in different…
1
vote
2 answers

java.io.FileNotFoundException (Read-only file system) // Uploading files to S3

I am trying to create csv files from a list of maps and uploading them to S3 bucket through a lambda function. Following is the code: public void createCSV(List> changedRecords, Context context, String tableName) …
miserable
  • 697
  • 1
  • 12
  • 31
1
2