Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not support https proxy #4

Open
jpriebe opened this issue Dec 22, 2023 · 0 comments
Open

Does not support https proxy #4

jpriebe opened this issue Dec 22, 2023 · 0 comments

Comments

@jpriebe
Copy link

jpriebe commented Dec 22, 2023

Our VPC requires the use of our managed HTTPS proxy for egress. I tried every possible way to set an environment variable to get the lambda to use the proxy. Nothing worked. I had to modify the code like this:

    https_proxy = os.environ.get('HTTPS_PROXY')
    proxy_definitions = {
        'https': https_proxy,
    }

    config = Config(region_name=aws_region, connect_timeout=boto_timeout, retries={'max_attempts': boto_retries}, proxies_config={'proxy_use_forwarding_for_https': True}, proxies=proxy_definitions)

The proxy_use_forwarding_for_https is the critical bit of config. It might work without the proxies and be able to get the proxy directly from the environment variable, but I didn't test that combination. I just know that nothing worked until I set proxy_use_forwarding_for_https to True.

I'm sure this could all be made more generic so that you could control the proxy config without code changes, but I just wanted to share what worked for me.

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

No branches or pull requests

1 participant