@Override
        public int hashCode() {
            final int prime = 31;
            int result = 1;
            result = prime * result + ((awsAccessKeyId == null) ? 0 : awsAccessKeyId.hashCode());
            result = prime * result + ((serviceEndpoint == null) ? 0 : serviceEndpoint.hashCode());
            return result;
        }
Key object for the cache combines the access key and the service
endpoint.
aws-java-sdk-sts/src/main/java/com/amazonaws/auth/SessionCredentialsProviderFactory.java