title: How can I connect to the AWS IAM API in a private VPC?
body: <p>I am trying to run Terraform in a private VPC using the AWS provider. Terraform <a href="https://www.terraform.io/docs/providers/aws/guides/custom-service-endpoints.html" rel="nofollow noreferrer">supports overriding various AWS endpoints</a> and so I have been using <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html" rel="nofollow noreferrer">VPC Endpoints</a> to expose relevant services in my VPC and overriding those endpoints in my provider configuration.</p>
  
  <p>Unfortunately IAM is not supported by VPC Endpoints - I need this API to create some resource for example AWS roles, so how can I use this API in my private VPC from Terraform?</p>
  
  <pre><code>$ terraform -v
  Terraform v0.11.13
  + provider.aws v2.17.0
  </code></pre>