-
Notifications
You must be signed in to change notification settings - Fork 4k
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
cli: http proxy does not work anymore #32228
Comments
did you simply
And it was working in 2.165.0 but not anymore since 2.166.0 ? |
We are also experiencing similar issues. Works with versions <=2.166.0 `[16:46:26] Some context information is missing. Fetching... [16:46:26] [trace] SdkProvider#resolveEnvironment() |
Yes before HTTPS_PROXY was working. I think the proxy config for v2 was easier. With v3 you need to do more manually as the linked AWS docu describes. Seems like third party libs are necessary. That is also the reason why it worked with 2.165.0 because there v2 of aws sdk was used. We did not test 2.166.0 to be honest, but as @munch9 wrote it seems to work with 2.166.0, but since the update to aws-sdk v3 it does not work. This change was applied in 2.167.0. |
Same here, this is a critical bug for us as we cannot move past version 2.166.0 now due to this. "Could not assume role in target account using current credentials" error due to ETIMEDOUT |
From my investigation, in SDK v3, proxy configuration must be explicitly set through an HTTP/HTTPS agent in the request handler, whereas v2 would automatically pick up the HTTP_PROXY environment variable through the httpOptions.proxy setting. I guess CDK should look into its implementation to address that. I am reaching out to the team for further investigation. |
Thanks for reporting! We were aware of this issue and a fix is already released. 2.171.0 (the latest version, just got released) is recommended, though 2.170.0 will also have the fix for this particular issue. To be clear: the |
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
With the migration to aws-sdk-js-v3 the http proxy options do not work anymore.
Using HTTP(S)_PROXY or http(s)_proxy are ignored as it seems by the aws-sdk. The cdk cli also do not extract those values.
Using --proxy also does not work and results in an error, which is only visible with --debug --verbose:
Due to the fact that env variables are ignored now I tried to provide the proxy settings to the cli via --proxy in different ways, but none was successful:
--proxy="http://localhost:3128"
--proxy="http://127.0.0.1:3128"
--proxy "http://localhost:3128"
--proxy "http://127.0.0.1:3128"
--proxy="127.0.0.1:3128"
This issue describes some issues with http proxies in v3:
aws/aws-sdk-js-v3#5168
I am still searching for a way to work around this by editing the aws-cdk from the nodes_modules folder, but no luck so far.
Regression Issue
Last Known Working CDK Version
2.165.0
Expected Behavior
http proxy env variables are used properly as well as the --proxy option
Current Behavior
http proxy env variables are not working. Same applies for --proxy
Reproduction Steps
Well. Most likely you need an http proxy to test this
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.168.0
Framework Version
No response
Node.js Version
22.11.0
OS
mac osx
Language
Java
Language Version
Java 21
Other information
No response
The text was updated successfully, but these errors were encountered: