Skip to content
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: 1 second delay when not running on an EC2 instance #32131

Open
1 task
rix0rrr opened this issue Nov 14, 2024 · 1 comment
Open
1 task

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

rix0rrr opened this issue Nov 14, 2024 · 1 comment
Assignees
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI

Comments

@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 14, 2024

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

@rix0rrr rix0rrr added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 14, 2024
@rix0rrr rix0rrr changed the title CLI: 1s delay when not running on an EC2 instance CLI: 1 second delay when not running on an EC2 instance Nov 14, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Nov 14, 2024
@khushail
Copy link
Contributor

opened by the core team. Marking as P1

@khushail khushail added p1 effort/small Small work item – less than a day of effort effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. effort/small Small work item – less than a day of effort labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

3 participants