Just after I posted this I noticed that I had an environment variable set up causing the region to be set as "local".
I removed the AWS_DEFAULT_REGION environment variable and it is now connecting to the correct endpoint URL using the region from my config file.
502 and 494 Error : The request could not be satisfied by cloudfrontasked 8 months ago
Trying to serve https but getting: 403 the request could not be satisfiedasked 4 years ago
The gateway cannot connect to the specified domainasked 3 years ago
Could not connect to the endpoint URL: "https://s3.local.amazonaws.com/"asked a year ago
A connection to the ECC2 t2 micro instance could not be establishedAccepted Answerasked 4 months ago
Changing the UI of the Amazon Connect Streams CCPasked 5 months ago
tDBConnection_1 IO Error: The Network Adapter could not establish the connection\njava.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connectionasked 5 months ago
"Connect failed" when trying to connect to the DocumentDB cluster from AWS C9asked 6 months ago
Secure Connection Failed: the authenticity of the received data could not be verifiedasked 8 months ago