Skip to content

Outbound HTTP sessions ignore proxy environment variables #139

Description

@JGoutin

Found while investigating #135, present in v1.15.0.

Three aiohttp.ClientSession constructions omit trust_env=True:

  • stdapi/aws_bedrock_mantle.pymantle_http_session()
  • stdapi/region_routing.py:357
  • stdapi/aws.py:580

aiohttp reads HTTPS_PROXY/HTTP_PROXY/NO_PROXY only when trust_env=True,
whereas botocore honours them unconditionally. So on a network where egress is only
possible through a proxy, the botocore paths work and every aiohttp path fails —
which is precisely the shape of #135's report: classic Bedrock reachable, Bedrock
Mantle unreachable in every region at once.

Measured with HTTPS_PROXY=http://127.0.0.1:9 (a dead port):

  • Mantle succeeded in 0.47 s — it ignored the proxy entirely
  • botocore failed with ProxyConnectionError in 9.78 s

Both halves are wrong: in a proxied network the first becomes a failure, and today
the two stacks simply disagree about the deployment's own network policy.

trust_env=True also enables .netrc lookups, so that is a deliberate decision to
state rather than a flag to set silently.

Needs a documentation line naming bedrock-mantle.<region>.api.aws and
com.amazonaws.<region>.bedrock-mantle as egress requirements, plus a
troubleshooting entry — an operator behind a proxy meets this as "Mantle models are
missing".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions