connect from behind corporate proxy #7769
Replies: 4 comments 1 reply
-
|
Here is documentation on using a proxy with the AWS CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-proxy.html. There may be configuration settings on your proxy that are preventing the connection. |
Beta Was this translation helpful? Give feedback.
-
|
Not exactly what you are looking for, but FYI someone found a way to use boto3 behind corporate proxy with NTLM/Kerberos authentication. https://github.com/mpieters3/urllib3_kerberos_proxy/blob/master/kerbmonkey/kerb_monkey.py#L55 |
Beta Was this translation helpful? Give feedback.
-
|
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
-
|
When running AWS CLI behind a corporate proxy, the CLI will only use the proxy if it is provided via standard proxy environment variables (used by the underlying HTTP stack). Set proxy variables for both HTTP and HTTPS, and optionally exclude local/metadata endpoints. export HTTP_PROXY="http://your.proxy.server:port" export HTTPS_PROXY="http://your.proxy.server:port" export NO_PROXY="localhost,127.0.0.1,169.254.169.254" If your proxy requires authentication, include credentials in the proxy URL. export HTTPS_PROXY="http://username:password@your.proxy.server:port" export HTTP_PROXY="http://username:password@your.proxy.server:port" On Windows PowerShell, set environment variables like this. $env:HTTPS_PROXY="http://username:password@your.proxy.server:port" $env:HTTP_PROXY="http://username:password@your.proxy.server:port" Verify the variables are set. env | grep -i proxy Then retry a simple AWS call. aws sts get-caller-identity If your company proxy does SSL inspection, you may see TLS/certificate errors. As a temporary diagnostic step only, test with SSL verification disabled. aws sts get-caller-identity --no-verify-ssl Do not keep --no-verify-ssl enabled permanently; instead install your corporate root CA into the OS trust store so TLS can be verified correctly. Once the proxy variables are set (and certificates are trusted if the proxy inspects TLS), AWS CLI requests should work normally behind the corporate proxy. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a strange problem when connecting from behind corp proxy.
What I´m trying to do is easy:
aws s3 ls --profile my_profile
Here is my setup
Client, from which I´m trying to connect:
Ubuntu@WSL-2@Windows10
proxy environment is set, curl, wget, etc. works as expected
WSL-Host is Windows10 and here runs px.exe (proxy which abstracts auth part and takes info from windows credential store)
What happens
Client side:
On Host side (px debug log)
curl on wsl side
but
So it seems, that aws-cli is making a call to sts within the whole process and that sems to go awry :-(
Anyone has any tipps for me ?
Thanks guys!
Beta Was this translation helpful? Give feedback.
All reactions