Even when not running on an EC2 instance, the new CLI default credential provider will try to hit IMDS with a timeout of 1 second when it needs to figure out the region:
[11:52:10] Unable to retrieve AWS region from IMDS: Error: Error fetching metadata token: TimeoutError: Socket timed out without establishing a connection within 1000 ms
Regression Issue
[ ] Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
Don't try the EC2 credentials provider if we're not on an EC2 instance
Describe the bug
Even when not running on an EC2 instance, the new CLI default credential provider will try to hit IMDS with a timeout of 1 second when it needs to figure out the region:
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Don't try the EC2 credentials provider if we're not on an EC2 instance
Current Behavior
It does do it.
Reproduction Steps
Run the CDK CLI with
-vvv
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
-
Framework Version
No response
Node.js Version
-
OS
-
Language
TypeScript
Language Version
No response
Other information
No response