Skip to content

cdk <command> --profile <named profile> tries default regardless #671

Closed
@dxunix

Description

@dxunix

cdk commands does not pick up the named profile from .aws/credential and ./aws/config. the profile is configured thru aws configure and in the format as specified in the aws doc. (two files, [<profile name>] in credential file and [profile <profile name>] in config file.

Reproduction Steps

create the profile
specify account number and region in the stack env.
run cdk synth or cdk deploy with --profile <profile name>

Error Log

[Error at /test-stack] Need to perform AWS calls for account ************, but no credentials found. Tried: default credentials.
Found errors

Environment

  • **CLI Version : 1.16.3 **
  • **Framework Version: 1.16.3 **
  • OS : mac os
  • **Language : python **

Other

Also tried to remove the [default] blocks in the .aws/ files, still same error.


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions