continue icon indicating copy to clipboard operation
continue copied to clipboard

Unable to use Claude4 with aws

Open juzj opened this issue 5 months ago • 7 comments

Before submitting your bug report

Relevant environment info

- OS: macOS
- Continue version:1.0.30
- IDE version:VSCode 1.102.3
- Model: Claude Sonnet 3.7/Claude Sonnet 4
- config:
  
name: Local Assistant
version: 1.0.0
schema: v1
models:
  - name: Claude 4 Sonnet
    provider: bedrock
    model: us.anthropic.claude-sonnet-4-20250514-v1:0
    region: us-east-1
    env:
      aws_access_key_id: xxxxxxx
      aws_secret_access_key: xxxxx
      endpoint_url: https://xxxxx.cloudfront.net
    roles:
      - chat
context:
  - provider: code
  - provider: docs
  - provider: diff
  - provider: terminal
  - provider: problems
  - provider: folder
  - provider: codebase

Description

Description

Image

Can't call normally, I can use python boto3 normal question and answer with the same configuration.

To reproduce

No response

Log output

Error handling model response

There was an error handling the response from Claude 4 Sonnet.

Please try to submit your message again, and if the error persists, let us know by reporting the issue using the buttons below.




Could not load credentials from any providers

juzj avatar Jul 30 '25 10:07 juzj

How are you authenticating to AWS? SSO, or ? We see this similar issues when local credentials files aren't correct/or aligned for example.

In your env section I see you don't specify a profile. In this case it defaults to looking for one called "bedrock" so that might also be something to check.

chezsmithy avatar Jul 31 '25 14:07 chezsmithy

Thank you, I have found the solution.

juzj avatar Aug 12 '25 06:08 juzj

Thank you, I have found the solution.

I'm getting the same error while on Windows (windows only, not mac or linux). What was your issue's root cause?

44cort44 avatar Aug 13 '25 21:08 44cort44

How are you authenticating to AWS? SSO, or ? We see this similar issues when local credentials files aren't correct/or aligned for example.

In your env section I see you don't specify a profile. In this case it defaults to looking for one called "bedrock" so that might also be something to check.

I'm using sso. I can do the same process on a mac that I do on windows, and my windows machine gives this same error while my mac machine works.

44cort44 avatar Aug 13 '25 21:08 44cort44

I believe I've found the issue - when there's a "HOME" environment variable set, Continue doesn't properly use the aws cli.

If users remove the HOME environment variable it works...

44cort44 avatar Aug 20 '25 16:08 44cort44

Thank you, I have found the solution.

Could you please share what was the solution? I'm having the same problem. I have tried using both access keys and profile (authenticated via SSO). I can also access the mode using python boto3.

mfmotta avatar Nov 10 '25 08:11 mfmotta

Thank you, I have found the solution.

Could you please share what was the solution? I'm having the same problem. I have tried using both access keys and profile (authenticated via SSO). I can also access the mode using python boto3.

As a temp work around just copy/paste your .aws folder from the root of your user directory to wherever you have your HOME environment set.

44cort44 avatar Nov 10 '25 12:11 44cort44