简体   繁体   中英

Connection issue with AWS DynamoDb from docker container

My client program is to get the records from DynamoDb table. My binary is working as expected on host machine, but if I run the same binary in Linux container, it's returning this error:

Unable to connect to endpoint

Do I need to change anything in client code or container settings?

This might be a bit late, but in case someone else is trying to run AWS through docker, by default it checks the SSL certificates when it connects . So you need to initialise the AWS client configuration with:

Aws::Client::ClientConfiguration config;
config.verifySSL = false;

It might be an SSL issue, if you see exceptions and/or logs mentioning about some sort of SSL certificate or connection error.

The short summary is that your linux box need to trust Amazon's root CA, which you can test by visiting https://dynamodb.eu-west-3.amazonaws.com .

Here is more detailed documentation to diagnose and resolve certificate related issues: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ats-certs.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM