-
Notifications
You must be signed in to change notification settings - Fork 862
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
no_proxy environment variable is not respected #3198
Comments
I believe the answer is yes, but are you using the AWSPowerShell module (it's the one installed by default on all Windows-based AMIs)? The commit you linked didn't include If I try your example using the AWSPowerShell.NetCore module instead (which offers the same functionality as |
I have created a PR to |
Thanks for the quick response and PR for this issue. |
Comments on closed issues are hard for our team to see. |
@slinkymanbyday Version |
Hi @normj and @dscpinheiro Thought this was good since a couple of my tests seemed to work, but wondering what the implementation of the no_proxy matching here is, since it seems to be failing when chatting to s3 buckets. https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Core/Amazon.Util/Internal/_bcl/NoProxyFilter.cs#L54 For example, i have my question is, is there a way I can make my no_proxy list compatible with CLI tools and powershell tools? It doesn't appear so with the current implementation. I'm wondering if NoProxyFilter needs ot be modified to just be a simple suffix match instead? |
@slinkymanbyday The fix for this has been released in AWSSDK.Core Version 3.7.304.13. Will close the issue for now. Thanks for reporting the issue! |
Comments on closed issues are hard for our team to see. |
thanks for the fix @peterrsongg |
Describe the bug
When https_proxy and no_proxy environment variables are set, the SDK will always go through the proxy, event if AWS endpoints are in the no_proxy list.
Bug introduced here: 8cf768c
For example, we go through proxy for when private endpoints are not supported for a service, and go direct when we have a private endpoint for a service provisioned, our no_proxy looks something like:
Expected Behavior
endpoints that are specified in the no_proxy list do not use the proxy.
The expected behavior is also mentioned in https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-proxy.html
Current Behavior
endpoints that are listed in the no_proxy environment variable still use the proxy set by the HTTP_PROXY environment variable.
Reproduction Steps
setx https_proxy http://proxy.internal:8080
setx no_proxy ssm.ap-southeast-2.amazonaws.com
$instance = Get-EC2InstanceMetadata -Category InstanceId
$runPSCommand = Send-SSMCommand -DocumentName AWS-ConfigureAWSPackage -InstanceId "$instance"-Parameter @{'action'='Install';'name'='AwsVssComponents'}
should reach endpoint (either IAM failure, or success)
Current behaviour: proxy deny (if endpoint not allowed through proxy), proxy allow, or proxy timeout (if proxy doesn't exist)
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWS Tools for Windows PowerShell
Version 4.1.512
Copyright 2012-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Amazon Web Services SDK for .NET
Core Runtime Version 3.7.302.7
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Targeted .NET Platform
whichever the Powershell tools use
Operating System and version
Windows Server 2016, 2019, 2022
The text was updated successfully, but these errors were encountered: