continuedev/continue · warning
AWS profile with name ${profile} not found in ~/.aws/credent
Error message
AWS profile with name ${profile} not found in ~/.aws/credentials, using default profile What it means
Bedrock's getCreds resolves credentials via the Node credential provider chain. It first tries fromNodeProviderChain({ profile }) with cache disabled; if that throws (profile missing), it warns and falls back to fromNodeProviderChain() with the default chain, which will pick up default profile creds, env vars, or the instance/role credentials.
Source
Thrown at packages/openai-adapters/src/apis/Bedrock.ts:93
}
}
}
async getCreds() {
if (this.config?.env?.accessKeyId && this.config?.env?.secretAccessKey) {
return {
accessKeyId: this.config.env.accessKeyId,
secretAccessKey: this.config.env.secretAccessKey,
};
}
const profile = this.config.env?.profile ?? "bedrock";
try {
return await fromNodeProviderChain({
profile: profile,
ignoreCache: true,
})();
} catch (e) {
console.warn(
`AWS profile with name ${profile} not found in ~/.aws/credentials, using default profile`,
);
}
return await fromNodeProviderChain()();
}
async getClient(): Promise<BedrockRuntimeClient> {
const region = this.config.env?.region;
// If apiKey is provided, use bearer token authentication
if (this.config.apiKey) {
return new BedrockRuntimeClient({
region,
token: fromStatic({
token: { token: this.config.apiKey },
}),
});
}
View on GitHub (pinned to 5522c6f44c)
Solutions
- Run `aws configure list --profile <profile>` to confirm the profile exists locally
- Fix the profile spelling in your Bedrock model config to match ~/.aws/credentials exactly (case-sensitive)
- Add the profile to ~/.aws/credentials if missing: `[myprofile]\naws_access_key_id = ...\naws_secret_access_key = ...`
- If fallback to the default profile is intended, verify default creds resolve: `aws sts get-caller-identity`
Example fix
# before (~/.aws/credentials) [default] aws_access_key_id = AKIA... profile = prod # after [default] aws_access_key_id = AKIA... [prod] aws_access_key_id = AKIA... aws_secret_access_key = ...
Defensive patterns
Strategy: fallback
Validate before calling
const profiles = fs.readFileSync("~/.aws/credentials", "utf8")
.match(/^\[(.+)]$/gm) ?? [];
if (!profiles.includes(profile)) throw new Error(`Unknown profile: ${profile}`); Prevention
- Verify profiles with `aws configure list-profiles` before configuring Bedrock
- Use consistent profile names across team machines via shared setup scripts
- Confirm fallback default credentials resolve with `aws sts get-caller-identity`
When it happens
Trigger: Configuring a Bedrock profile name that does not exist in ~/.aws/credentials or ~/.aws/config; misspelled profile; credentials file absent on the machine.
Common situations: Typos in the profile setting, sharing configs across machines with different AWS profiles, running in CI/containers without the named profile baked in.
Related errors
- accessKeyId is required for Bedrock API. Only found secretAc
- secretAccessKey is required for Bedrock API. Only found acce
- AWS Bedrock rerank error (${(error as any).code}): ${error.m
- Error in BedrockReranker.rerank: ${error.message}
- Error in BedrockReranker.rerank: Unknown error occurred
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/480e94ba2dc5d4f8.
Report an issue: GitHub.