Skip to main content
This guide walks through creating AWS credentials so Compiler can use Claude through Amazon Bedrock instead of the Anthropic API.

Why use Bedrock?

  • Use existing AWS billing and cost management
  • Keep model traffic inside your AWS network when the instance runs in a VPC with a Bedrock VPC endpoint (PrivateLink)
  • Comply with enterprise AWS-only policies
  • Use AWS IAM for access control

Prerequisites

  • An AWS account with Bedrock access
  • IAM permissions to create users and policies
  • Claude models enabled in your Bedrock region

Step 1: Verify Claude model access

Claude models on Bedrock are enabled automatically when first invoked. However, first-time Anthropic users may need to submit use case details before access is granted.
  1. Open the Amazon Bedrock console
  2. Select your preferred region (for example us-east-1 or us-west-2)
  3. Go to Model catalog in the left sidebar
  4. Search for “Claude” and select a current model (for example Claude Sonnet 5.5)
  5. Click Open in playground to test access
  6. If prompted, submit the use case details for Anthropic models (see below)
Once you’ve invoked a model successfully, it’s enabled account-wide for all users.
Compiler uses Claude through Bedrock inference profiles (for example us.anthropic.…, au.anthropic.… or global.anthropic.…). Models that AWS offers only as in-region on-demand models, without an inference profile, won’t appear in Compiler.

Anthropic use case submission

First-time users see a form asking for use case details. Here’s what to enter: Example use case description:
Internal tool for analyzing and understanding how codebases work. Used by our team to explore software projects and get answers to questions about functionality.

Step 2: Create an IAM policy

  1. Go to the IAM console > Policies > Create policy
  2. Select the JSON tab and paste:
  3. Click Next
  4. Name the policy (for example CompilerBedrockAccess)
  5. Click Create policy

Step 3: Create an IAM user

  1. Go to IAM > Users > Create user
  2. Enter a username (for example compiler-bedrock)
  3. Click Next
  4. Select Attach policies directly
  5. Search for and select your policy (CompilerBedrockAccess)
  6. Click Next > Create user

Step 4: Create access keys

  1. Click the user you just created
  2. Go to the Security credentials tab
  3. Under Access keys, click Create access key
  4. Select Application running outside AWS
    Compiler takes access keys even when it runs on AWS. It doesn’t use EC2 instance roles or ECS task roles for Bedrock.
  5. Click Next > Create access key
  6. Save these credentials securely:
    • Access key ID: AKIA...
    • Secret access key: wJalrXUtnFEMI...
The secret access key is only shown once. Download the CSV or copy it now.

Step 5: Configure your instance

  1. Log in to your self-hosted instance as an admin
  2. Go to Settings > AI > Provider (or choose AWS Bedrock during onboarding)
  3. Select AWS Bedrock as the service
  4. Enter your credentials:
  5. Click Save Compiler validates your credentials by calling the Bedrock ListFoundationModels API, then loads the available models with ListInferenceProfiles.
  6. Open Settings > AI > Models to choose which models people can use and how much effort each one puts in. When a model has more than one inference profile, it has a Routing choice: a geography profile (for example Australia, United States or Europe) or Global. Compiler starts each model on the most local geography profile AWS offers in your region, and uses Global only when nothing else is available. New models appear tagged New and stay off until you turn them on.

Troubleshooting

Prompt caching is on by default. If the model or region you use doesn’t support it on Bedrock, turn it off in Settings > AI > Context > Prompt caching, or switch the model’s Routing in Settings > AI > Models.
  1. Confirm the IAM policy allows bedrock:ListInferenceProfiles
  2. Confirm your region offers Claude inference profiles (check Cross-region inference in the Bedrock console)
If your AWS Organization has Service Control Policies (SCPs) that restrict Bedrock to specific regions:
  1. Use a region where your organization allows Bedrock access (check with your AWS administrator)
  2. In Settings > AI > Models, choose a route your SCPs allow for each model
  3. Cross-region inference profiles (apac.*, global.*, us.*) won’t work if SCPs block those regions
  1. Verify your IAM policy includes all required permissions (see step 2)
  2. Make sure Claude models are enabled in your selected region (see step 1)
  3. Check whether your organization has SCPs limiting Bedrock access