From 931fbed8b3260749b01b68f40548537311d63f27 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Tue, 3 Mar 2026 11:54:18 -0800 Subject: [PATCH] fix(ux): clarify credential detection messages to avoid confusion (#2147) Distinguish between 'no local credentials' and 'using spawn-cached credentials' so users understand why an initial failure message is followed by a success. Fixes #2142 Agent: ux-engineer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 --- packages/cli/src/aws/aws.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/aws/aws.ts b/packages/cli/src/aws/aws.ts index ee45d9d4..7d5a68c9 100644 --- a/packages/cli/src/aws/aws.ts +++ b/packages/cli/src/aws/aws.ts @@ -507,7 +507,7 @@ export async function authenticate(): Promise { logInfo(`AWS CLI ready, using region: ${region}`); return; } - logWarn("AWS CLI found but credentials invalid or expired"); + logWarn("No AWS credentials available in local environment"); } // 2. Check env vars for REST mode @@ -553,10 +553,10 @@ export async function authenticate(): Promise { ]); if (result.exitCode === 0) { lightsailMode = "cli"; - logInfo(`AWS CLI ready with cached credentials, using region: ${cachedRegion}`); + logInfo(`AWS CLI ready with credentials cached by spawn. Using region: ${cachedRegion}`); return; } - logWarn("Cached AWS credentials invalid or expired"); + logWarn("Credentials cached by spawn are invalid or expired"); awsAccessKeyId = ""; awsSecretAccessKey = ""; delete process.env.AWS_ACCESS_KEY_ID;