diff --git a/services/docker-compose.yml b/services/docker-compose.yml --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -20,6 +20,7 @@ ports: - "${COMM_SERVICES_PORT_TUNNELBROKER}:50051" volumes: + - $HOME/.aws/config:/root/.aws/config:ro - $HOME/.aws/credentials:/root/.aws/credentials:ro - ./tunnelbroker/tunnelbroker.ini:/root/tunnelbroker/tunnelbroker.ini:ro # backup diff --git a/services/tunnelbroker/docker-server/contents/server/src/Tools/AwsTools.cpp b/services/tunnelbroker/docker-server/contents/server/src/Tools/AwsTools.cpp --- a/services/tunnelbroker/docker-server/contents/server/src/Tools/AwsTools.cpp +++ b/services/tunnelbroker/docker-server/contents/server/src/Tools/AwsTools.cpp @@ -13,13 +13,6 @@ return profileRegion; } } - if (Aws::Config::HasCachedCredentialsProfile(profileName)) { - auto profile = Aws::Config::GetCachedCredentialsProfile(profileName); - Aws::String credRegion = profile.GetRegion(); - if (!credRegion.empty()) { - return credRegion; - } - } return {}; } @@ -28,7 +21,7 @@ config.region = getAwsRegion(); if (config.region.empty()) { throw std::runtime_error( - "Error: AWS region is not provided in the credentials."); + "Error: AWS region is not provided in the ~/.aws/config"); } return std::make_unique(config); }