Skip to content

spawn fails with STS VPC endpoint: GetCallerIdentity times out when private DNS is enabled #33

Closed

Description

@scttfrdmn

Summary

When a VPC has an STS Interface endpoint with private DNS enabled, sts.us-east-1.amazonaws.com resolves to a private IP (172.31.49.231). If the EC2 instance running spawn is in a subnet without a route to that endpoint, all spawn operations that call STS fail with a connection timeout.

Symptom

failed to get caller identity: operation error STS: GetCallerIdentity, exceeded maximum number of attempts, 3, 
https response error StatusCode: 0, RequestID: , request send failed, 
Post "https://sts.us-east-1.amazonaws.com/": dial tcp 172.31.49.231:443: i/o timeout

Environment

  • spawn 0.36.6
  • EC2 instance with instance profile (credentials from IMDS)
  • VPC has STS Interface endpoint with private DNS enabled
  • Instance is in a subnet without access to the VPC endpoint

Workaround

None found. Setting AWS_STS_REGIONAL_ENDPOINTS=regional doesn't help because the regional endpoint URL is the same one that resolves to the VPC endpoint IP.

Expected behaviour

If GetCallerIdentity fails due to a network error, spawn should fall back to using the instance metadata (IMDSv2) to determine the account ID and region, rather than failing hard.

Alternatively: document that spawn requires either (a) no STS VPC endpoint with private DNS, or (b) the subnet must have a route to the endpoint.

Context

https://github.com/scttfrdmn/aws-microbiome-demo — spawn is called from nf-spawn inside a Nextflow pipeline running on an EC2 instance.

Activity

  1. added
    bug
    on Jun 3, 2026
  2. added a commit that references this issue on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions