Skip to main content

All Questions

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
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
795 views

DynamoDB java sdk v2 client batchWrite retries

Does the DynamoDB Java SDKv2 offer a retry strategy for batchWriteItem calls? I'm looking for a retry strategy that retries items that would otherwise be returned as unprocessedItems. In the DynamoDB ...
yassin's user avatar
  • 652
0 votes
1 answer
84 views

Fetch records from DynamoDb db table

I have a Dynamodb records example { "cDate":"2024-03-04", "myList":[ { "M" : { "rt":{"N":"1.06"}, ...
Saurabh Jhunjhunwala's user avatar
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
1 vote
0 answers
200 views

How to ADD values in a map field in DynamoDB using UpdateItem operation?

I need to constantly increment values for a map field value in DynamoDB. The map will contain keys with counters, and for each update I want to atomically increment the keys. The corner case is that ...
João Pedro Schmitt's user avatar
0 votes
1 answer
724 views

AWS Java SDK DynamoDB, how to get attribute values from ExecuteStatementRequest response?

I'm using Java AWS SDK to query a DynamoDB table using ExecuteStatementRequest, but I'm don't know how to fetch the returned attribute values from the response. Given I have the following query: var ...
João Pedro Schmitt's user avatar
0 votes
1 answer
952 views

How to escape reserved keywords in DynamoDB ExecuteStatementRequest?

I'm trying to issue an update ExecuteStatementRequest using DynamoDB and Java SDK 2.0. I'm struggling to escape keywords that are columns in my table schema. The following statement: var response = ...
João Pedro Schmitt's user avatar
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
1k views

AWS DynamoDb with Optimistic Locking and Batch Write Operations

Can we use DynamoDb optimistic locking with batchWriteItem request? AWS docs on Optimistic locking mention that a ConditionalCheckFailedException is thrown when the version value is different while ...
Mike Reddington's user avatar
0 votes
1 answer
728 views

AWS DynamoDB DynamoDbEnhancedClient Asynchronous?

Are the methods available in DynamoDbEnhancedClient asynchronous? In this documentation, it is mentioned that it is truly asynchronous and it returns CompletableFuture but the java docs mention it ...
Mike Reddington's user avatar
2 votes
1 answer
1k views

Nested beans with StaticTableSchema & enhanced DynamoDB client from AWS Java SDK 2.x

How do I create a StaticTableSchema for a nested bean (like for the items property here)? data class Order( var id: Long = 0L, var items: List<OrderLineItem> = emptyList(), … ) data ...
madhead's user avatar
  • 33.6k
2 votes
0 answers
3k views

Condition expression in a PutItem request is not supported by DynamoDB

I am trying to conditionally write an item to a DynamoDB table. I am using AWS SDK for Java 2.x. Below is my code: PutItemEnhancedRequest<AssessmentBean> putItemRequest = ...
Shane Bishop's user avatar
  • 4,862
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
0 answers
740 views

Scan list of maps from dynamodb with Java SDK v2

I am trying to scan a DynamoDB table that has lists of maps as attribute values. DynamoDB table: { "Name": "n", "Accounts": [ { "address": "a&...
levye's user avatar
  • 195

15 30 50 per page