aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 13 forks source link

Support of http_proxy and https_proxy in config file #538

Closed AlexVulaj closed 2 months ago

AlexVulaj commented 1 year ago

Describe the feature

Currently, using an http/https proxy for commands requires exporting HTTP_PROXY or HTTPS_PROXY as an environment variable as per the existing docs. It would be convenient if these proxies could instead be declared in configuration specific to the AWS CLI to encapsulate the change.

Use Case

As a user, I would like to set an https_proxy that my aws-cli always uses so that I am always accessing our customers' resources through a published, company owned IP. Setting this in a configuration file one time would allow this change to survive terminal restarts, as well as prevent the environment variable from needlessly impacting other terminal commands.

Proposed Solution

When running commands, the AWS CLI should check for the existence of a proxy variable in ~/.aws/config (or %UserProfile%\.aws\config on Windows) and use that when making calls.

Other Information

No response

Acknowledgements

CLI version used

aws-cli/2.11.12

Environment details (OS name and version, etc.)

Darwin/22.4.0 source/arm64

tim-finnigan commented 1 year ago

Thanks @AlexVulaj for the feature request. I'm going to transfer this to our cross-SDK repository for further review. Requests involving configurations should be considered across SDKs to maintain consistency. It looks like some SDKs don't even support the environment variables (Rust, .NET, Java...) so I think this is worth looking into further.

Mythra commented 1 year ago

Hey I just got pointed to this from our PR adding support for the environment variables for proxies to .NET! Let me know if we can be of any help discussing what to do with overarching decisions (whether it be adding use cases about why it's useful, or something else)! We'd be happy to do whatever we could.

For the three clients that don't support this proxying today (via environment variables -- Rust, Java-v2, and .NET) we had planned on opening PRs for each (though we only have PRs open for the two GA clients right now -- Java-v2 & .NET). We'll hold off on that third PR for now to not cause any extra work, but are very interested in getting this supported on every single SDK. Having it configuration too would be really nice!

kellertk commented 2 months ago

This is a duplicate of #127 . Closing here to track there.

github-actions[bot] commented 2 months ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.