Skip to content

Disable all proxies for internal calls of the lambda init#89

Draft
dfangl wants to merge 1 commit intolocalstackfrom
daniel/unc-378
Draft

Disable all proxies for internal calls of the lambda init#89
dfangl wants to merge 1 commit intolocalstackfrom
daniel/unc-378

Conversation

@dfangl
Copy link
Copy Markdown
Member

@dfangl dfangl commented Apr 2, 2026

Motivation

When users set http_proxy or https_proxy environment variables, they will effectively break the lambda init, unless they set no_proxy to include the LS endpoint (e.g. localhost.localstack.cloud or the LS IP, depending on the runtime).

Internal communication between LS and the lambda container init should never be proxied.

Changes

This PR disables all proxies for internal calls by the init.

Note

This does NOT disable the proxy for all calls within the lambda runtime itself. Any call to LS might still be proxied.

Related

Potentially fixes UNC-368

@dfangl dfangl requested a review from simonrw April 2, 2026 12:23
Copy link
Copy Markdown

@simonrw simonrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a sensible change to make. Thanks!

Comment on lines +51 to +53
client := &http.Client{
Transport: transport,
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: perhaps this could be extracted into a helper function or type so every client creation can go through the same code path? We use this struct initialization twice in this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants