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
- Open the AWS Bedrock Console
- Go to Model access in the left sidebar
- Click "Manage model access"
- Select the Anthropic Claude models you want to use:
Claude Sonnet 4(recommended)Claude Sonnet 3.7Claude Sonnet 4.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)
- In IAM, open your user or role
- Go to Permissions → Add permissions → Add AWS managed policy
- Search for and attach
AmazonBedrockLimitedAccess
Reference: AmazonBedrockLimitedAccess policy
Option B: Custom Bedrock Policy (Recommended for Production)
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 ID | Model |
|---|---|
global.anthropic.claude-sonnet-4-5-20250929-v1:0 | Claude Sonnet 4.5 (global) |
global.anthropic.claude-sonnet-4-20250514-v1:0 | Claude Sonnet 4 (global) |
eu.anthropic.claude-sonnet-4-5-20250929-v1:0 | Claude Sonnet 4.5 (EU) |
eu.anthropic.claude-sonnet-4-20250514-v1:0 | Claude Sonnet 4 (EU) |
eu.anthropic.claude-3-7-sonnet-20250219-v1:0 | Claude Sonnet 3.7 (EU) |
Pricing (AWS Bedrock — Anthropic models, Ireland region)
| Model | Input per 1K tokens | Output 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 Type | Input Tokens | Output Tokens | Approx Cost |
|---|---|---|---|
| Unit (per Java method) | 2,500–10,000 | 5,000–20,000 | $0.08–$0.33 |
| API Test (Swagger) — Rest Assured | 2,000–5,000 | 5,000–10,000 | $0.08–$0.17 |
| API Test (Swagger) — Postman | 2,000–5,000 | 5,000–10,000 | $0.08–$0.17 |
| Functional Test | 15,000–50,000 | 10,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. :::