Skip to content

CLI: 1 second delay when not running on an EC2 instance #627

Open
@rix0rrr

Description

@rix0rrr

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:

[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

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions