{"record":{"id":"480e94ba2dc5d4f8","repo":"continuedev/continue","slug":"aws-profile-with-name-profile-not-found-in-a-480e94","errorCode":null,"errorMessage":"AWS profile with name ${profile} not found in ~/.aws/credentials, using default profile","messagePattern":"AWS profile with name (.+?) not found in ~/\\.aws/credentials, using default profile","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/openai-adapters/src/apis/Bedrock.ts","lineNumber":93,"sourceCode":"      }\n    }\n  }\n\n  async getCreds() {\n    if (this.config?.env?.accessKeyId && this.config?.env?.secretAccessKey) {\n      return {\n        accessKeyId: this.config.env.accessKeyId,\n        secretAccessKey: this.config.env.secretAccessKey,\n      };\n    }\n    const profile = this.config.env?.profile ?? \"bedrock\";\n    try {\n      return await fromNodeProviderChain({\n        profile: profile,\n        ignoreCache: true,\n      })();\n    } catch (e) {\n      console.warn(\n        `AWS profile with name ${profile} not found in ~/.aws/credentials, using default profile`,\n      );\n    }\n    return await fromNodeProviderChain()();\n  }\n  async getClient(): Promise<BedrockRuntimeClient> {\n    const region = this.config.env?.region;\n\n    // If apiKey is provided, use bearer token authentication\n    if (this.config.apiKey) {\n      return new BedrockRuntimeClient({\n        region,\n        token: fromStatic({\n          token: { token: this.config.apiKey },\n        }),\n      });\n    }\n","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/openai-adapters/src/apis/Bedrock.ts#L75-L111","documentation":"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.","triggerScenarios":"Configuring a Bedrock profile name that does not exist in ~/.aws/credentials or ~/.aws/config; misspelled profile; credentials file absent on the machine.","commonSituations":"Typos in the profile setting, sharing configs across machines with different AWS profiles, running in CI/containers without the named profile baked in.","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`"],"exampleFix":"# before (~/.aws/credentials)\n[default]\naws_access_key_id = AKIA...\n\nprofile = prod\n\n# after\n[default]\naws_access_key_id = AKIA...\n\n[prod]\naws_access_key_id = AKIA...\naws_secret_access_key = ...","handlingStrategy":"fallback","validationCode":"const profiles = fs.readFileSync(\"~/.aws/credentials\", \"utf8\")\n  .match(/^\\[(.+)]$/gm) ?? [];\nif (!profiles.includes(profile)) throw new Error(`Unknown profile: ${profile}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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`"],"tags":["aws","bedrock","credentials","iam","config"],"backgroundTag":"aws-profile-not-found","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}