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

질문됨 4년 전177회 조회
1개 답변
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();
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠