'Using DynamoDB with Vert.x

I am using Vert.x and I am trying to get items from DynamoDB table, by sort key and partition key. Here is how I build the client

private static DynamoDbAsyncClient buildDynamoDBAsyncClient(final Vertx vertx) {
        return VertxSdkClient.withVertx(DynamoDbAsyncClient.builder(), vertx.getOrCreateContext())
                .build();
    }

And how I request the data.

    private List<CompletableFuture<List<Map<String, Object>>>> getOverrideMetadataRecord(Promise<OverrideMetadataEntry> promise) {
        final List<CompletableFuture<List<Map<String, Object>>>> resultList = new ArrayList<>();

                    final Map<String, KeysAndAttributes> requestItems = new HashMap<>();
                    requestItems.put(tableName, KeysAndAttributes.builder().keys(Arrays.asList(createMapKeyToGet())).build());
                    final BatchGetItemRequest batchGetItemRequest = BatchGetItemRequest.builder()
                            .requestItems(requestItems).build();
                    final CompletableFuture<List<Map<String, Object>>> futureBatchResponseData =
                            dynamoDbAsyncClient.batchGetItem(batchGetItemRequest).thenApply(this::getResponseData);
                    resultList.add(futureBatchResponseData);

                    return resultList;

    }

I don't receive any objects and then I get operation timeout. What am I missing ? thank you in advance



Solution 1:[1]

Don't post the same question twice just cause you want an answer fast.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gerrit