Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cdk diff : Need to perform AWS calls for account xxxxx, but no credentials have been configured #30595

Closed
jcbutil opened this issue Jun 20, 2024 · 5 comments
Assignees
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@jcbutil
Copy link

jcbutil commented Jun 20, 2024

Describe the bug

~/.aws/credentials and ~/.aws/config are all setup properly but still encountering this error.

aws_sts
aws_conf

Expected Behavior

Successfull cdk diff execution.

Current Behavior

Error encountererd on cdk diff

Errors found:
[18:32:36] Determining if we're on an EC2 instance.
[18:32:36] Does not look like an EC2 instance.
[18:32:36] Toolkit stack: CDKToolkit
[18:32:36] Setting "CDK_DEFAULT_REGION" environment variable to eu-central-1
[18:32:36] Resolving default credentials
[18:32:36] Looking up default account ID from STS
[18:32:39] Could not refresh notices: Error: Request timed out
[18:32:56] Unable to determine the default AWS account (TimeoutError): Connection timed out after 300000ms

[18:33:12] Some context information is missing. Fetching...
[18:33:12] Setting "load-balancer:account=xxxxx:loadBalancerArn=arn$:aws:elasticloadbalancing:eu-central-1:644227882183:loadbalancer/net/k8s-default-xxxx-xxxx/xxxx:loadBalancerType=network:region=eu-central-1" context to {"$providerError":"Need to perform AWS calls for account xxxx, but no credentials have been configured","$dontSaveContext":true}
[18:33:12] Setting "vpc-provider:account=xxxxx:filter.vpc-id=vpc-xxxx:region=eu-central-1:returnAsymmetricSubnets=true" context to {"$providerError":"Need to perform AWS calls for account 644227882183, but no credentials have been configured","$dontSaveContext":true}

[18:33:26] Not making progress trying to resolve environmental context. Giving up.
[Error at /XXXXStack] Need to perform AWS calls for account xxxxx, but no credentials have been configured
Annotations.addMessage (/home/xxxxx/xxxx-IaC/node_modules/aws-cdk-lib/core/lib/annotations.js:1:1071)

Reproduction Steps

cdk diff --verbose

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.87.0 (build 9fca790)

Framework Version

No response

Node.js Version

v20.14.0

OS

Ubuntu

Language

TypeScript

Language Version

No response

Other information

No response

@jcbutil jcbutil added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 20, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jun 20, 2024
@ashishdhingra ashishdhingra self-assigned this Jun 20, 2024
@ashishdhingra ashishdhingra removed the needs-triage This issue or PR still needs to be triaged. label Jun 20, 2024
@ashishdhingra
Copy link
Contributor

@jcbutil Good morning. Please confirm if you have tried using --profile parameter as described here to explicitly use named profile configured in your environment. For your use case, you need to use cdk diff --profile chnet --verbose.

Thanks,
Ashish

@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 20, 2024
@jcbutil
Copy link
Author

jcbutil commented Jun 21, 2024

@jcbutil Good morning. Please confirm if you have tried using --profile parameter as described here to explicitly use named profile configured in your environment. For your use case, you need to use cdk diff --profile chnet --verbose.

Thanks, Ashish

Hi Ashish,
Yes I did execute cdk diff with --profile chnet but still encounter the same error.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 21, 2024
@ashishdhingra
Copy link
Contributor

ashishdhingra commented Jun 21, 2024

@jcbutil Good morning. Please confirm if you have tried using --profile parameter as described here to explicitly use named profile configured in your environment. For your use case, you need to use cdk diff --profile chnet --verbose.
Thanks, Ashish

Hi Ashish, Yes I did execute cdk diff with --profile chnet but still encounter the same error.

@jcbutil Thanks for your response. Could you share the logs generated by command cdk diff --profile chnet --verbose? Kindly note that you need to configure profile chnet with credentials in ~/.aws/credentials file.

Also could you try using the latest CDK version and see if error goes away?

Error is perhaps thrown here.

Thanks,
Ashish

@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 21, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 23, 2024
@github-actions github-actions bot added closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 29, 2024
@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants