How to deploy Claude Code with Amazon Bedrock, Google Vertex AI, and other cloud providers. Use when user asks about AWS Bedrock, GCP Vertex AI, cloud deployment, or enterprise deployment.
Deploy Claude Code through AWS Bedrock or Google Vertex AI for enterprise cloud environments. Use when users ask about cloud deployment, AWS Bedrock, or GCP Vertex AI setup and configuration.
/plugin marketplace add reggiechan74/claude-plugins/plugin install claude-code-metaskill@claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Claude Code supports deployment through multiple providers beyond the direct Claude API, including Amazon Bedrock and Google Vertex AI for enterprise cloud deployment.
Claude Code integrates with Amazon Bedrock to enable deployment through AWS infrastructure using Claude models available in your AWS account.
Navigate to the Amazon Bedrock console, access Model access settings, and request Claude model availability in your region.
Multiple authentication methods are supported:
AWS CLI:
aws configure
Environment variables:
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret
export AWS_SESSION_TOKEN=your-token # Optional
SSO profile:
aws sso login --profile=<name>
export AWS_PROFILE=your-profile
Bedrock API keys:
export AWS_BEARER_TOKEN_BEDROCK=your-token
Enable Bedrock integration:
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1 # Or preferred region
Optional override for Haiku region:
export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION=us-west-2
Default models include Claude Sonnet 4.5 and Claude Haiku 4.5.
Customize via:
export ANTHROPIC_MODEL='model-id'
export ANTHROPIC_SMALL_FAST_MODEL='haiku-model-id'
Recommended settings:
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096
export MAX_THINKING_TOKENS=1024
Required actions:
bedrock:InvokeModelbedrock:InvokeModelWithResponseStreambedrock:ListInferenceProfilesExample IAM policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"bedrock:ListInferenceProfiles"
],
"Resource": "*"
}
]
}
Automatic credential refresh supports corporate identity providers through awsAuthRefresh and awsCredentialExport configuration options.
Claude Code integrates with Google Vertex AI to enable deployment through Google Cloud Platform. The service supports both global and regional endpoints for model access.
gcloud) installedEnable the Vertex AI API in your GCP project:
gcloud config set project YOUR-PROJECT-ID
gcloud services enable aiplatform.googleapis.com
Navigate to Vertex AI Model Garden to search for and request access to Claude models like Claude Sonnet 4.5.
Approval time: Typically 24-48 hours
Claude Code uses standard Google Cloud authentication and automatically detects the project ID from environment variables.
gcloud auth application-default login
Set environment variables:
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=global # Or specify regional endpoints
export ANTHROPIC_VERTEX_PROJECT_ID=YOUR-PROJECT-ID
Default models include Claude Sonnet 4.5 as the primary model and Claude Haiku 4.5 as the fast model.
Customize through environment variables:
export ANTHROPIC_MODEL='model-id'
export ANTHROPIC_SMALL_FAST_MODEL='haiku-model-id'
Prompt Caching:
Automatically supported via cache_control flags
1M Token Context: Available in beta for Sonnet 4 and 4.5
IAM Requirements:
Assign roles/aiplatform.user role for necessary permissions:
gcloud projects add-iam-policy-binding YOUR-PROJECT-ID \
--member="user:email@example.com" \
--role="roles/aiplatform.user"
Quota limitations:
Unsupported models in specific regions:
429 rate-limit errors:
| Feature | Claude API | AWS Bedrock | Google Vertex AI |
|---|---|---|---|
| Setup Complexity | Simple | Moderate | Moderate |
| Authentication | API key | AWS credentials | GCP credentials |
| Regional Options | Global | AWS regions | GCP regions |
| Billing | Direct | AWS billing | GCP billing |
| Enterprise Features | Basic | Advanced | Advanced |
| Compliance | Standard | AWS compliance | GCP compliance |
Both Bedrock and Vertex AI support automated workflows:
GitHub Actions with Bedrock:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::ACCOUNT:role/ROLE
aws-region: us-east-1
- name: Run Claude Code
run: |
export CLAUDE_CODE_USE_BEDROCK=1
claude -p "task" --output-format json
GitLab CI with Vertex AI:
script:
- gcloud auth activate-service-account --key-file=$GCP_KEY_FILE
- export CLAUDE_CODE_USE_VERTEX=1
- export ANTHROPIC_VERTEX_PROJECT_ID=$PROJECT_ID
- claude -p "task"