Stop using root for day-to-day work — create a dedicated IAM user and give the CLI its own credentials.
AWS recommends never using root credentials for day-to-day work — root can do literally anything in the account, including things a compromised CLI credential shouldn't be able to touch, like closing the account itself. CDK needs its own, narrower identity.
Sign in to the AWS Console with your root credentials, then:
cdk-user and continue.Heads up:
AdministratorAccessis generous for a single-user project like this one. CDK genuinely needs broad permissions to bootstrap and deploy — creating IAM roles, S3 buckets, and whatever else a stack asks for — so a narrowly-scoped policy would realistically block your very firstcdk bootstrap. A real production setup scopes this down once you know exactly which services your stacks touch; for learning, it's the right tradeoff.
aws configure
This asks for four things, all in the .csv you just downloaded (except the last two, which you choose yourself):
us-east-1, eu-west-1, whatever's closest to you)json is a reasonable defaultFrom here on, every aws and cdk command you run uses this user's credentials, not root's.