Skip to main content

AWS Bedrock Configuration

AWS Bedrock provides managed access to foundation models (including Claude by Anthropic) in your AWS account. RoostGPT CLI uses Bedrock as its default AI provider.

Prerequisites

  • An AWS account
  • Bedrock model access enabled for your target models
  • An IAM user or role with Bedrock permissions

Step 1: Enable Bedrock Model Access

  1. Open the AWS Bedrock Console
  2. Go to Model access in the left sidebar
  3. Click "Manage model access"
  4. Select the Anthropic Claude models you want to use:
    • Claude Sonnet 4 (recommended)
    • Claude Sonnet 3.7
    • Claude Sonnet 4.5
  5. Submit the access request (approval is usually instant for Anthropic models)

Step 2: Attach Bedrock Permissions to Your IAM User/Role

Option A: Use AWS Managed Policy (Quickest)

  1. In IAM, open your user or role
  2. Go to PermissionsAdd permissionsAdd AWS managed policy
  3. Search for and attach AmazonBedrockLimitedAccess

Reference: AmazonBedrockLimitedAccess policy

Attach this minimal custom policy for fine-grained control:

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockAPIs",
"Effect": "Allow",
"Action": [
"bedrock:Get*",
"bedrock:List*",
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"bedrock:CreateInferenceProfile",
"bedrock:ApplyGuardrail"
],
"Resource": "*"
}
]
}

For the full policy used by RoostGPT installer, see the Self-Hosted Ubuntu deployment guide.

Step 3: Configure Credentials

Set your AWS credentials on the RoostGPT host:

# Option 1: Environment variables in .bash_profile
export AWS_ACCESS_KEY_ID=your_access_key_id
export AWS_SECRET_ACCESS_KEY=your_secret_access_key
export AWS_DEFAULT_REGION=eu-west-1
export AWS_BEDROCK_MODEL_TYPE=cross-region
export AWS_BEDROCK_MODEL=global.anthropic.claude-sonnet-4-20250514-v1:0

source ~/.bash_profile

# Option 2: AWS credentials file
mkdir -p ~/.aws
cat > ~/.aws/credentials <<EOF
[default]
aws_access_key_id = your_access_key_id
aws_secret_access_key = your_secret_access_key
EOF

Step 4: Add to RoostGPT (.env file)

AI_TYPE=bedrock_ai
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_SESSION_TOKEN= # Optional: for temporary credentials
AWS_DEFAULT_REGION=eu-west-1
AWS_BEDROCK_MODEL_TYPE=cross-region # Supports: foundation, cross-region
AWS_BEDROCK_MODEL=global.anthropic.claude-sonnet-4-20250514-v1:0

Supported Inference Profiles

Use one of the following cross-region inference profile IDs:

Profile IDModel
global.anthropic.claude-sonnet-4-5-20250929-v1:0Claude Sonnet 4.5 (global)
global.anthropic.claude-sonnet-4-20250514-v1:0Claude Sonnet 4 (global)
eu.anthropic.claude-sonnet-4-5-20250929-v1:0Claude Sonnet 4.5 (EU)
eu.anthropic.claude-sonnet-4-20250514-v1:0Claude Sonnet 4 (EU)
eu.anthropic.claude-3-7-sonnet-20250219-v1:0Claude Sonnet 3.7 (EU)

Pricing (AWS Bedrock — Anthropic models, Ireland region)

ModelInput per 1K tokensOutput per 1K tokens
Claude Sonnet 4$0.003$0.015
Claude Sonnet 3.7$0.003$0.015
Claude Sonnet 3.5$0.003$0.015

Typical RoostGPT Token Usage

Test TypeInput TokensOutput TokensApprox Cost
Unit (per Java method)2,500–10,0005,000–20,000$0.08–$0.33
API Test (Swagger) — Rest Assured2,000–5,0005,000–10,000$0.08–$0.17
API Test (Swagger) — Postman2,000–5,0005,000–10,000$0.08–$0.17
Functional Test15,000–50,00010,000–20,000$0.20–$0.45

:::tip Cost Optimization The hosted RoostGPT stack (with DB) caches AI responses and avoids repeat calls for identical inputs. The CLI and VS Code extension do not cache. :::

References