-
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
Need to perform AWS calls for account <account-number>, but no credentials have been configured #32357
Comments
I capture tcpdump request during cdk bootstrap command. The output is
As you can see, the ip address of STS service requested is in us-east-1 region. Apparently, it could not work in the China region. Please fix this issue, Thanks! |
Hi @zhaojiew10 , looks like your issue is quite similar to this earlier reported issues -
|
Thanks for your response. After checking the issue #32135 and #32120, I think this issue is different from them. This issue happened for cdk version >= 2.167.0, even for the latest version 2.171.1 (build a95560c). If I export the environment(AK, SK, SESSION_TOKEN) in the shell, cdk bootstrap works well. And following is error output wuth -vvv.
|
It looks like it's due to the use of fromini in awscli-compatible.ts. When uses source_profile, fromini will use the global sts service to get aksk by default, but this obviously doesn't work for China. Adding clientConfig to fromIni allows specifying the region. By setting cn-north-1, fromIni can retrieve the AK/SK. However, it’s unclear if this modification is the optimal approach.
|
Requesting core team's input on this issue as similar issues have been reported earlier few weeks back and team provided a fix. |
I'm a little confused. Wouldn't/shouldn't the Is it not? Can you do me a favor? Can you please spell out the INI file profiles that are involved in your call and the environment variables/command line flags you are using, once again? Just to be sure? |
Related: aws/aws-sdk-js-v3#6711 |
I have submitted another issue to the AWS SDK for JavaScript repository as aws/aws-sdk-js-v3#6711. In the discussion, the SDK maintainer clarified that the SDK does not fetch region information from the ini file and defaults to us-east-1 if no region is explicitly specified in the formini call. Therefore, for non-commercial AWS regions, it is necessary to specify the region in the formini call to ensure it functions correctly. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
Error occur when run cdk bootstrap. Need to perform AWS calls for account , but no credentials have been configured
Regression Issue
Last Known Working CDK Version
2.166.0
Expected Behavior
bootstrap output
Current Behavior
bootstrap error
Reproduction Steps
$ cdk --version
2.167.0 (build 677e108)
when run bootstrap command meet following error
the aws config is
I could get credential
bootstrap output
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.167.0+
Framework Version
No response
Node.js Version
Node.js 16.x
OS
amazonlinux 2
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: