I’m trying to test a Java app running in a docker container on my desktop. The app runs fine if I execute it directly from my command line, but it fails when I try to run it inside a Docker container on my desktop. The error output shows that the library is requesting region information, then failing with this error:
com.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.
I am providing the region as an environment variable:
AWS_DEFAULT_REGION=us-east-2
If I hard-code the region, it works fine. (The library is successfully extracting the credentials from environment variables.)