title: SignatureDoesNotMatch when overriding STS API endpoint in Terraform
body: <p>I am running Terraform in AWS region us-west-2 (Oregon) in a private VPC. Because of this I am using <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html" rel="nofollow noreferrer">VPC endpoints</a> to expose the <a href="https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html" rel="nofollow noreferrer">STS API</a> and am overriding this endpoint in Terraform as follows:</p>
  
  <pre><code>provider "aws" {
    endpoints {
      sts = "https://sts.us-west-2.amazonaws.com/"
    }
  }
  </code></pre>
  
  <p>Unfortunately this gives the following error:</p>
  
  <pre><code>provider.aws: error validating provider credentials: error calling sts:GetCallerIdentity: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
  
  </code></pre>
  
  <p>What could be causing this issue? Applying the same Terraform code without the endpoint override in a public VPC worked as expected.</p>
  
  <p>Things I have checked:</p>
  
  <ul>
  <li>The instance Terraform is running on is displaying the correct time (UTC)</li>
  <li>AWS_REGION and AWS_DEFAULT_REGION env vars are set to us-west-2</li>
  <li>The AWS_SECRET_ACCESS_KEY env var I am using to authenticate (together with AWS_ACCESS_KEY_ID) contains only <a href="https://github.com/aws/aws-cli/issues/602#issuecomment-378426711" rel="nofollow noreferrer">alphanumeric characters</a></li>
  </ul>
  
  <p>Versions:</p>
  
  <ul>
  <li><code>terraform version</code>: Terraform v0.11.13</li>
  <li><code>terraform-provider-aws</code>: v2.17.0</li>
  </ul>