I'm trying to connect to DynamoDB DAX Cluster using DynamoDBAsynClient that runs from ECS Cluster, I get **
java.io.IOException: Channel was closed before it could be written to
** while establishing the connection
Below is the cluster client configuration
@Bean
public DynamoDbAsyncClient getDynamoDbAsyncClient() throws IOException {
software.amazon.dax.Configuration configuration = software.amazon.dax.Configuration.builder()
.url(dynamoDbDaxEndPointUrl)
.region(Region.of(awsRegion)).build();
return ClusterDaxAsyncClient.builder()
.overrideConfiguration(configuration)
.build();
}
@Bean
public DynamoDbEnhancedAsyncClient getDynamoDbEnhancedAsyncClient(DynamoDbAsyncClient dynamoDbAsyncClient) {
return DynamoDbEnhancedAsyncClient.builder()
.dynamoDbClient(dynamoDbAsyncClient)
.build();
}
I tried tweaking timeout configuration, still get same error. Anyone has any input with this issue?