CLI: STS assume role operations not using proxy settings #32290
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
cli
Issues related to the CDK CLI
p0
package/tools
Related to AWS CDK Tools or CLI
potential-regression
Marking this issue as a potential regression to be checked by team member
Describe the bug
When running CLI operations (synth/deploy) STS assume role operation not using proxy settings.
connect ETIMEDOUT 54.239.32.126:443
Running netstat during cli operations shows repeated attempts to connect directly until timeout occurs
tcp 0 1 U-1IZ5ADH66TV96.d:41412 67.220.224.163:https SYN_SENT 395770/node
npx cdk -vvv synth
Regression Issue
Last Known Working CDK Version
2.166.0
Expected Behavior
CLI commands should use proxy settings and assume role correctly
Current Behavior
Proxy is not used so connection times out
Reproduction Steps
Be behind an HTTP proxy
export HTTPS_PROXY=<proxy name>
Use a basic new CDK app with no or empty cdk.context.json
Create user an account with permission to assume role in the deployment target account
Create a role with necessary CDK deployment permissions in target account and trust to the assuming account root
Export user session credentials into the virtual environment
Synth stack and cdk.context.json is correctly populated.
repeat steps with any higher version of aws-cdk >2.166.0 and error is seen
Minimal working example
package.json
requirements.txt
app.py
As a reverse test to prove the behaviour if not behind a proxy you can use a similar example.
set a non existent proxy value
export HTTPS_PROXY=http://localhost:8181
using cdk <=2.166.0 this will fail to synth as invalid proxy will be used and fail to connect
using cdk >2.166.0 will synth correctly as proxy setting is ignored
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.171.0
Framework Version
No response
Node.js Version
v20.12.1
OS
22.04
Language
Python
Language Version
3.9.20
Other information
No response
The text was updated successfully, but these errors were encountered: