@Override
        public URI getCredentialsEndpoint() {
            String fullUri = System.getenv(CONTAINER_CREDENTIALS_FULL_URI);
            if (fullUri == null || fullUri.length() == 0) {
                throw new SdkClientException("The environment variable " + CONTAINER_CREDENTIALS_FULL_URI + " is empty");
            }

            URI uri = URI.create(fullUri);

            if (!isHttps(uri) && !isAllowedHost(uri.getHost())) {
                throw new SdkClientException("The full URI (" + uri + ") contained withing environment variable " +
                        CONTAINER_CREDENTIALS_FULL_URI + " has an invalid host. Host should resolve to a loopback " +
                        "address or have the full URI be HTTPS.");
            }

            return uri;
        }
A URI resolver that uses environment variable {@value CONTAINER_CREDENTIALS_FULL_URI} as the URI
for the metadata service.
Optionally an authorization token can be provided using the {@value CONTAINER_AUTHORIZATION_TOKEN} environment variable.
aws-java-sdk-core/src/main/java/com/amazonaws/auth/ContainerCredentialsProvider.java