You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWS and Anthropic together revolutionized, with AWS Bedrock, the way modern AI models may be used in enterprise environments where intellectual property and privacy are paramount.
It would be amazing if Claude Code, just like other Anthropic tools & models, as well as Aider, would be available to use through AWS Bedrock.
After further testing, it appears that Claude Code does not support AWS credentials provided through profiles to the same extent that the awscli, Aider, Cline, Goose and others do.
Here is a completely valid ~/.aws/config file for use with AWS SSO:
This will result in the following error from Claude Code when AWS_PROFILE=gen-ai:
> /init is analyzing your codebaseâĶ
  âŋ  API Error: Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name",
"sso_start_url". Got sso_session, sso_account_id, sso_role_name
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
It can be worked around as follows for the time being, albeit less user-friendly:
claude() {
# Claude Code does not support profiles for now
eval "$(aws configure export-credentials --profile gen-ai --format env)
export AWS_REGION=us-west-2
export CLAUDE_CODE_USE_BEDROCK=1
export ANTHROPIC_MODEL='us.anthropic.claude-3-7-sonnet-20250219-v1:0' claude"
export DISABLE_PROMPT_CACHING=1
command claude "$@"
}
claude
Reacted by parth3724, Jake Davies, Arthur Moura Carvalho, Edward Kim and David Wickstrom
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
bcherny commentedon Feb 24, 2025
We support Bedrock! Lmk if you run into any issues: https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#connect-to-amazon-bedrock
Quentin-M commentedon Feb 25, 2025
@bcherny Thank you for your answer.
After further testing, it appears that Claude Code does not support AWS credentials provided through profiles to the same extent that the awscli, Aider, Cline, Goose and others do.
Here is a completely valid
~/.aws/configfile for use with AWS SSO:This will result in the following error from Claude Code when
AWS_PROFILE=gen-ai:It can be worked around as follows for the time being, albeit less user-friendly:
Merge pull request #6 from anthropic-labs/sidb/mcp-server-readme
github-actions commentedon Aug 9, 2025
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.