I setup aws credentials using aws configure sso
command and it worked without any problems with aws command.
However cdk deploy
command could not recognize aws credentials even
- aws command work without problems
cdk synth
work without problems
OS: archlinux
➜ uname -r
6.10.8-arch1-1
aws cdk was installed via npm
npm i -g aws-cdk
node and npm version as follows
$ node -v
v22.8.0
$ npm -v
10.8.2
cdk version
$ cdk --version
2.156.0 (build 2966832)
.aws/config
[profile my-company-profile]
sso_session_id = my-company
sso_account_id = 1234567890
sso_role_name = AdministratorAccess
region = ap-northeast-1
output = json
[sso-session my-company]
sso_start_url = https://abc.awsapps.com/start#
sso_region = us-east-1
sso_registration_scopes = sso:account:access
I changed .aws/config
file as below
[profile my-company-profile]
sso_account_id = 1234567890
sso_role_name = AdministratorAccess
region = ap-northeast-1
output = json
sso_start_url = https://abc.awsapps.com/start#
sso_region = us-east-1
- deleted sso-session section
- deleted
sso_session_id
in profile section - added
sso_start_url
andsso_region
in profile section
after this it worked both aws command and cdk command including cdk deploy