Skip to content

Use environment variables to configure HTTP proxies #2958

Open
@kgregory-chariot

Description

Describe the feature

The V1 Java SDK and others use the environment variables PROXY_HTTP and PROXY_HTTPs to configure a proxy. The v2 SDK only allows system properties.

There was already request to add this, but it was incorrectly closed by the PR that supported system properties (and I see that there's an outstanding issue that would have been solved by that PR, so perhaps the wrong issue was closed?)

Is your Feature Request related to a problem?

This means that you can't use a consistent deployment approach for deploying AWS applications in a polyglot environment. Or you have to write explicit code in your Java v2 SDK projects to retrieve the relevant environment variables and set system properties, before anything else happens in the program.

Proposed Solution

Update ProxyConfiguration.java for all three HTTP client implementations to look for environment variables as well as system properties.

Describe alternatives you've considered

Not using the v2 SDK is the simplest.

Otherwise, as mentioned above, writing explicit code to set the system properties from the value of the environment variables (because Lambda doesn't let you set system properties when the JVM is first run).

Acknowledge

  • I may be able to implement this feature request

AWS Java SDK version used

2.17.101

JDK version used

openjdk version "11.0.13" 2021-10-19

Operating System and version

Ubuntu 20.04

Activity

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

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p2This is a standard priority issueproxyThis issue is related to a proxy configuration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions