Kipt

Claude Code on Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry

Claude Code Bedrock guide, plus Google Cloud's Agent Platform (Vertex AI) and Microsoft Foundry: setup wizard, env vars, IAM, model pinning and limits.

By the Kipt team · Updated 24 October 2026

To use Claude Code with Amazon Bedrock, run claude, choose 3rd-party platform and then Amazon Bedrock at the login prompt, or set CLAUDE_CODE_USE_BEDROCK=1 with working AWS credentials. Google Cloud's Agent Platform (formerly Vertex AI) and Microsoft Foundry follow the same pattern with CLAUDE_CODE_USE_VERTEX=1 and CLAUDE_CODE_USE_FOUNDRY=1, and then you pin model versions your cloud account can call.

Running Claude Code through your own cloud keeps billing, IAM and audit logs where your company already manages them. This guide covers each provider's setup, the variables that matter, model pinning and which features you give up. Every detail comes from the official pages for Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry.

Which cloud providers can run Claude Code?

Claude Code can send its model requests to Anthropic directly or to a cloud provider. The enterprise deployment overview lists these cloud options:

Provider Turn it on with Authentication Setup wizard Cost tracking
Amazon Bedrock CLAUDE_CODE_USE_BEDROCK=1 AWS credentials or a Bedrock API key Yes, /setup-bedrock AWS Cost Explorer
Claude Platform on AWS CLAUDE_CODE_USE_ANTHROPIC_AWS=1 API key or AWS credentials No AWS Cost Explorer
Google Cloud's Agent Platform CLAUDE_CODE_USE_VERTEX=1 GCP credentials Yes, /setup-vertex GCP Billing
Microsoft Foundry CLAUDE_CODE_USE_FOUNDRY=1 API key, Microsoft Entra ID or bearer token No Azure Cost Management

Claude Platform on AWS is a separate option: you buy Claude through AWS Marketplace but call the Anthropic-operated Claude API. Every provider bills pay as you go through that cloud, and prompt caching is on by default everywhere.

Anthropic still recommends Claude for Teams or Enterprise for most organizations, because those plans include Claude on the web and need no infrastructure. The cloud route makes sense when you want to inherit existing AWS, GCP or Azure compliance controls and billing.

How do you set up Claude Code with Amazon Bedrock?

First, in the Amazon Bedrock console, open the Model catalog, select an Anthropic model and submit the use case form. You do this once per AWS account, and access is granted right after you submit. With AWS Organizations you can submit it once from the management account and child accounts inherit the approval.

Then pick a path:

  • Wizard: run claude, choose 3rd-party platform, then Amazon Bedrock. If you are already signed in, type /setup-bedrock. The wizard detects AWS profiles in ~/.aws, or accepts a Bedrock API key, an access key and secret, or credentials already in your environment. It asks for a region, checks which Claude models you can call, lets you pin them and saves everything to the env block of ~/.claude/settings.json.
  • Manual: set environment variables yourself, which suits CI and scripted rollouts.
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1   # optional if your AWS profile sets a region

# credentials: any method in the AWS default chain, for example
aws sso login --profile=your-profile-name
export AWS_PROFILE=your-profile-name

# or a Bedrock API key instead of AWS credentials
# export AWS_BEARER_TOKEN_BEDROCK=your-bedrock-api-key

Claude Code uses the default AWS SDK credential chain, so EC2 instance profiles and ECS task credentials work with no extra step. It resolves the region from AWS_REGION, then AWS_DEFAULT_REGION, then your active profile, and finally falls back to us-east-1.

Your IAM identity needs bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream, bedrock:ListInferenceProfiles and bedrock:GetInferenceProfile on inference profiles and foundation models. The docs suggest a dedicated AWS account for Claude Code to make cost tracking and access control simpler.

For SSO sessions that expire, the awsAuthRefresh setting runs a command such as aws sso login --profile myprofile when credentials have expired. Use awsCredentialExport only when you cannot change .aws and must return credentials as JSON.

Bedrock also offers the Mantle endpoint, which serves Claude through the native Anthropic API shape. Turn it on with CLAUDE_CODE_USE_MANTLE=1. It needs its own bedrock-mantle: IAM actions and uses model IDs such as anthropic.claude-haiku-4-5.

How do you set up Claude Code on Google Vertex AI?

Google renamed Vertex AI to Google Cloud's Agent Platform, but the variables still say Vertex. You need a GCP project with billing, the API enabled, access to Claude models and quota in your region.

  1. Enable the API with gcloud services enable aiplatform.googleapis.com.
  2. Request access to Claude models in the Model Garden. Approval may take 24 to 48 hours.
  3. Sign in with Application Default Credentials, for example gcloud auth application-default login, or point GOOGLE_APPLICATION_CREDENTIALS at a service account key file.
  4. Set the variables below, or run claude and choose 3rd-party platform, then Google Vertex AI. /setup-vertex reopens the wizard later.
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=global
export ANTHROPIC_VERTEX_PROJECT_ID=YOUR-PROJECT-ID

# for models that don't support the global endpoint
export VERTEX_REGION_CLAUDE_HAIKU_4_5=us-east5

CLOUD_ML_REGION accepts global, a multi-region such as eu or us, or a single region such as us-east5. Not every model is offered on every endpoint type, so the per-model VERTEX_REGION_CLAUDE_* variables let you route individual models elsewhere. Assign the roles/aiplatform.user role, which includes aiplatform.endpoints.predict.

Claude Code sends requests to the project in ANTHROPIC_VERTEX_PROJECT_ID, even if GOOGLE_CLOUD_PROJECT or your credential file names a different one. The gcpAuthRefresh setting can run gcloud auth application-default login when credentials expire.

How do you set up Claude Code on Microsoft Foundry?

In the Microsoft Foundry portal, create a resource and then a deployment for each Claude model you want: Opus, Sonnet and Haiku. Note each deployment name, because those names become your model variables.

Authenticate one of three ways: copy an API key into ANTHROPIC_FOUNDRY_API_KEY, leave both key variables unset to use Microsoft Entra ID through the Azure default credential chain (for example after az login), or pass a token from another process in ANTHROPIC_FOUNDRY_AUTH_TOKEN.

export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_RESOURCE=my-resource   # the name only, not a URL

export ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8'
export ANTHROPIC_DEFAULT_SONNET_MODEL='claude-sonnet-5'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5'

Foundry has no setup wizard, so environment variables are the only way to configure it. The Azure AI User and Cognitive Services User roles include the permissions needed to call Claude models.

Why should you pin model versions?

Without pinning, the opus and sonnet aliases resolve to Claude Code's built-in default for each provider, which can lag the newest release or not be enabled in your account yet. As of 24 October 2026, the docs say the opus alias resolves to Opus 5.5 on Bedrock and Agent Platform and sonnet to Sonnet 4.5. On Foundry, opus resolves to Opus 4.6.

Pin with these variables:

  • ANTHROPIC_DEFAULT_OPUS_MODEL
  • ANTHROPIC_DEFAULT_SONNET_MODEL
  • ANTHROPIC_DEFAULT_HAIKU_MODEL
  • ANTHROPIC_DEFAULT_FABLE_MODEL

On Bedrock, the IDs carry an inference profile prefix such as us.anthropic.claude-opus-4-8. Set ANTHROPIC_BEDROCK_REGION_PREFIX to global, eu or another valid value if you want to keep the built-in defaults and change only the prefix. To expose several versions of one model family, each behind its own application inference profile ARN, use the modelOverrides setting.

Pinning also matters for cost. The docs warn that if you don't pin a primary model on Bedrock or Agent Platform, you are billed at the Opus rate, because Opus is the default. Background tasks such as session titles use the default Sonnet model on those providers, since Haiku may not be enabled.

On Bedrock and Agent Platform, Claude Code checks at startup whether it can call the models it plans to use and falls back to an earlier version, or from Opus to the default Sonnet model, for that session if it cannot. Foundry has no startup check, so requests simply fail when the default is unavailable. See the Claude Code models guide for aliases and effort.

Which features are missing on Bedrock, Vertex AI and Foundry?

The CLI and everything that runs locally work on every provider: VS Code and JetBrains extensions, subagents, hooks, commands, skills, CLAUDE.md, plugins, MCP servers, checkpoints, sandboxing, OpenTelemetry metrics and the managed settings file. The feature availability page lists what changes; the main points:

  • Needs a claude.ai account: cloud sessions, Claude Code on mobile, cloud scheduled tasks, Ultrareview, Code Review, Remote Control, the Chrome extension, computer use and voice dictation, among others. The desktop app has partial support through Claude Desktop on 3P.
  • Not on these providers: fast mode, Advisor, Channels, the analytics dashboard, server-managed settings and the /design-sync and /import commands.
  • Web search: not on Bedrock; on Agent Platform only for Opus 4, Sonnet 4, Haiku 4.5 and later models.
  • Auto mode: only with Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5 and the Fable models.
  • /logout: unavailable, because your cloud credentials handle sign-in.

Error reporting, Anthropic usage metrics and /feedback reports are off by default on these providers. If you need managed policy without server-managed settings, use a managed settings file or OS policy, covered in the Claude Code enterprise guide.

How do you check and troubleshoot the connection?

Run /status inside Claude Code. The provider line shows Amazon Bedrock, Google Vertex AI or Microsoft Foundry, along with the region, project or resource it resolved. If the line is missing, the variables are not reaching the process: export them in the shell that launches claude, or put them in the env block of your settings file.

Common fixes from the docs:

  • Bedrock "on-demand throughput isn't supported": use an inference profile ID as the model.
  • Bedrock SSO tabs keep opening: remove awsAuthRefresh and run aws sso login yourself before starting Claude Code.
  • Agent Platform "Could not load the default credentials": run gcloud auth application-default login.
  • Agent Platform 404 model not found: confirm the model is enabled in Model Garden and offered in the region you set.
  • Foundry repeated connection errors: check that ANTHROPIC_FOUNDRY_RESOURCE holds your real resource name, not a placeholder.

Claude Code uses the Bedrock Invoke API and does not support the Converse API. To track usage on any of these providers, export OpenTelemetry metrics as shown in the Claude Code OpenTelemetry guide.

Do your skills work the same on every provider?

Yes. Skills, CLAUDE.md files and hooks are local files, so they behave the same whichever cloud serves the model. That makes a shared skill collection portable across a Bedrock team and a Claude subscription team.

If you keep prompts and skills in Kipt, they live as Markdown in a private GitHub repo you own, and npx skills add https://github.com/<you>/<repo>.git --all -g installs every skill into Claude Code no matter which provider your session uses. For writing skills, see the Claude Code skills guide.

Questions

How do I use Claude Code with Amazon Bedrock?

Run claude, pick 3rd-party platform and then Amazon Bedrock at the login prompt, and follow the wizard. For scripted setups, set CLAUDE_CODE_USE_BEDROCK=1, make AWS credentials available through the default credential chain, and set AWS_REGION if your profile has no region.

Does Claude Code still work with Vertex AI?

Yes. Google now calls the service Google Cloud's Agent Platform, formerly Vertex AI. You enable it with CLAUDE_CODE_USE_VERTEX=1, CLOUD_ML_REGION and ANTHROPIC_VERTEX_PROJECT_ID, and the login prompt still labels the option Google Vertex AI.

Can I use Claude Code with Azure?

Yes, through Microsoft Foundry. Create Claude deployments in the Foundry portal, then set CLAUDE_CODE_USE_FOUNDRY=1 and ANTHROPIC_FOUNDRY_RESOURCE. Authenticate with an API key, Microsoft Entra ID through the Azure default credential chain, or a bearer token. Foundry has no setup wizard.

Why does Claude Code on Bedrock say a model is not available?

Your AWS account may not have access to the model Claude Code picked by default. Enable the model in the Bedrock console, or pin model IDs your account can call with ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL.

What features are missing when Claude Code runs on Bedrock or Vertex AI?

Features that need a claude.ai account, such as cloud sessions, Remote Control and Code Review, are not available, and the desktop app works only through Claude Desktop on 3P. Fast mode, Advisor and Channels are also missing, and web search is not available on Bedrock. The CLI, skills, hooks, subagents, MCP and plugins work on every provider.

More in Claude Code

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.