Skip to main content
2 votes
2 answers
152 views

What's the cost effective way to retrieve batch DDB Items by LSI sort keys?

I have a DDB table with the following structure: CustmerID (PK) emailId (SortKey) orderId (LSI) I want to get batch items using AWS DynamoDB Java SDK for the following 2 patterns: Get Items by a PK ...
Govinda Sakhare's user avatar
0 votes
0 answers
47 views

How to test dynamo query with QueryEnhancedRequest with Junit

I am having trouble writing JUnits for my DynamoDB query. Here is the original code: PageIterable<AccountTableItem> pages = table.query(queryEnhancedRequest); for(Page<AccountTableItem> ...
UhHuhOkSure's user avatar
1 vote
1 answer
41 views

Getting a number of items from a list by pagination in Dynamodb

I have a dynamodb structure like below: { "PK" : "queue#1234#view", "SK" : "board#1234", "items" : [ "1234&...
Kalindu's user avatar
  • 283
0 votes
1 answer
534 views

DynamoDB Java SDK - QueryRequest with IN clause

The Javadoc of software.amazon.awssdk.services.dynamodb.model.QueryRequest.expressionAttributeValues() says a following query can be done: ProductStatus IN (:avail, :back, :disc) where the values are ...
ash's user avatar
  • 335
0 votes
1 answer
1k views

GROUP BY-Like query in DynamoDB with DynamoDbEnhancedClient

I'm trying to write a Query in DynamoDB with logic similar to a GROUP BY in SQL. Let's consider the following table with partition key simulation_id: Simulation (Table): simulation_id_1 - type_1 - ....
Nano's user avatar
  • 854
2 votes
1 answer
177 views

Referring to existing Dynamo DB in Lambda functions

I'm trying to read an existing dynamo DB in Lambda function, but resources in YAML creates a new table. If I could do that, someone please help me how? Also I need to use an existing S3 bucket
Harsha D G's user avatar
0 votes
0 answers
327 views

How to fetch all the values of one column using column name in dynamoDB table in java?

I have a dynamoDB table in my aws account. I can create client like this. AmazonDynamoDB amazonDynamoDB = AmazonDynamoDBClient.builder().withRegion("eu-west-1").withCredentials(...
Pul kit's user avatar
  • 55
11 votes
1 answer
4k views

Unmarshalling DynamoDB Map<String, AttributeValue> 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....
Alex R's user avatar
  • 11.9k
1 vote
1 answer
1k views

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 ...
M_K's user avatar
  • 3,457
1 vote
1 answer
804 views

Can't convert Map<String, AttributeValue> (DynamoDB) to POJO if use annotation @Builder

I'm trying convert Map<String, AttributeValue> to POJO. I do it like that: new DynamoDBMapper(awsConfiguration.amazonDynamoDbClient()).marshallIntoObject(MyClass.class, myMap); @DynamoDBTable(...
diego's user avatar
  • 150
0 votes
1 answer
3k views

Using DynamoDBEnhancedAsyncClient to scan and fetch futureObject

I am trying to use v2 library to persist & retrieve data in non-blocking manner. Put method of DynamoDBEnhancedAsyncClient returns CompletableFuture object but scan and query methods return ...
Hrv's user avatar
  • 15
1 vote
1 answer
337 views

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 ...
Luke's user avatar
  • 161
7 votes
1 answer
13k views

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's user avatar
  • 1,410
1 vote
2 answers
3k views

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 ...
Ramón J Romero y Vigil's user avatar
4 votes
2 answers
5k views

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 ...
NotNotLogic's user avatar

15 30 50 per page