I have initiated an app cdk init app --language typescript
and ran the command cdk synth
and now I am running cdk bootstrap
but it throws this error:
Unable to resolve AWS account to use. It must be either configured when you define your CDK Stack, or through the environment
as I want to create cloudFormation changeset
Asked
Active
Viewed 2,801 times
0

Vadim Kotov
- 8,084
- 8
- 48
- 62

Yusuf
- 2,295
- 7
- 15
- 34
-
What's the name of your profile on the AWS credentials file? – Paolo Dec 19 '21 at 11:12
-
Does this answer your question? [How to resolve: 'Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment'](https://stackoverflow.com/questions/58963515/how-to-resolve-unable-to-resolve-aws-account-to-use-it-must-be-either-configu) – Paolo Dec 19 '21 at 13:52
2 Answers
1
solved when I did cdk bootstrap aws://yourAccountNumber/us-east-1
you can find your aws account number in AWS console under your name which its the same as Account ID, and the region flag mean any region you want to deploy your service

Yusuf
- 2,295
- 7
- 15
- 34