javav2: EBT worker hangs during connection establishment to a Dynamodb

0

Is there anything that prevents communication between an EBT worker and a Dynamodb?

I've been trying it the whole week, but without success...

The setup looks like this

  1. an EBT Web front-end accepts requests and records them in a DynamoDB. The corresponding unique ID (uid) is placed in an SQS queue. Here everything is fine.

  2. an EBT worker backend which receives the uid from the SQS. This works fine so far. Now the EBT worker should update the status in the DynamoDB. But I just can't manage to establish a connection to the DynamoDB. The needed env. vars in question are exported (access key and secret key)

DynamoDbClientBuilder ddbBuilder = DynamoDbClient.builder(); // also tried with many other DynamoDbClientBuilders like Default, Instance etc. etc. etc.
DynamoDbClient ddb = ddbBuilder.region(Region.EU_CENTRAL_1).build()

... here it hangs forever. No exception, no null value return. Nothing at all. Just hangs

But if I do the same thing (on the same eb instance with the same webapp user account) on the console everything is fine, for example with ...

eb ssh
sudo -u webapp bash
aws dynamodb list-tables --region eu-central-1

this shows the table in question. And I can also access the values belonging to the uid as expected. In other words: the needed credentials are there and they are valid.

I'm really running out of ideas of now...

Can anyone help here and give me a hint? I would be grateful even if someone only can tell this is simply not possible at the moment, for example because of a known bug.

thank you - Hans

Edited by: der-Hans-der-kanns on Oct 7, 2020 2:14 PM

Edited by: der-Hans-der-kanns on Oct 7, 2020 2:17 PM

asked 4 years ago172 views
1 Answer
0

fixed by a newer version of the awssdk (updated from v2.10.86 to 2.15.5)

and here is a dbclient builder code snippet I have successfully used in the end ...

AwsCredentialsProvider credentialsProvider = DefaultCredentialsProvider.create();  
DynamoDbClientBuilder ddbBuilder = DynamoDbClient.builder().region(EU_CENTRAL_1).credentialsProvider(credentialsProvider);              
DynamoDbClient ddb = ddbBuilder.region(Region.EU_CENTRAL_1).credentialsProvider(credentialsProvider).build();
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions