Skip to content

aws-cdk: console credentials are not picked up by the CLI #972

@mogusbi

Description

@mogusbi

Describe the bug

The CDK CLI does not pick up your AWS credentials if you have authenticated using your console credentials, as is now recommended on the AWS CLI documentation.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

CDK should be able to use your temporary console credentials in order to deploy.

Current Behavior

Deployment fails with

Unable to resolve AWS account to use. It must be either configured when you define your CDK Stack, or through the environment

Reproduction Steps

# Step 1: Authenticate
aws login

# Step 2: Deploy
cdk deploy --all

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.231.0

AWS CDK CLI version

2.1033.0

Node.js Version

22

OS

MacOS 26.1

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions