Environment Variables
AWS region for Bedrock service. Common regions:
us-east-1, us-west-2, eu-west-1, ap-northeast-1.AWS access key ID for authentication. Obtain from AWS IAM.
AWS secret access key for authentication.
AWS session token for temporary credentials (alternative to access key method).
Optional custom Bedrock endpoint URL (for VPC endpoints or testing).
Optional HTTP proxy URL for enhanced security (e.g.,
http://your-proxy:8080).Configuration Example
Add the following to your.env file:
AWS credentials can also be provided through:
- IAM roles (recommended for EC2/ECS deployments)
- AWS credential files (
~/.aws/credentials) - Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY)
Available Model Providers
Anthropic (Claude)
- claude-4-sonnet - Latest Claude with exceptional reasoning
- claude-3-5-sonnet - High-performance security analysis
- claude-3-5-haiku - Fast vulnerability scanning
- us.anthropic.claude-sonnet-4-20250514-v1:0 - US region optimized
- us.anthropic.claude-3-5-haiku-20241022-v1:0 - US region optimized
Amazon Nova
Multimodal models supporting text, image, and video:- amazon-nova-pro - Flagship multimodal model
- amazon-nova-lite - Fast and cost-effective
- amazon-nova-micro - Ultra-lightweight
Meta Llama
Open-source foundation models:- meta.llama3-1-405b-instruct - Largest Llama model
- meta.llama3-1-70b-instruct - Balanced performance
- meta.llama3-1-8b-instruct - Efficient lightweight model
- meta.llama3-2-90b-instruct - Latest generation
AI21 Labs
- ai21.jamba-1-5-large - Advanced language understanding
- ai21.jamba-1-5-mini - Fast inference
Cohere
- cohere.command-r-plus - Advanced reasoning
- cohere.command-r - Balanced performance
- cohere.command-light - Fast and efficient
DeepSeek
- deepseek-r1 - Reasoning-optimized model
Features
- Multi-Provider Access: Access models from 6+ AI companies through single interface
- Advanced Reasoning: Support for Claude 4 and reasoning-capable models
- Multimodal Models: Amazon Nova series for text, image, and video analysis
- Enterprise Security: AWS-native security, VPC integration, compliance certifications
- Cost Optimization: Wide range of model sizes for cost-effective testing
- Regional Availability: Deploy in your preferred AWS region for data residency
- High Performance: Low-latency inference through AWS global infrastructure
Converse API Requirements
PentAGI uses the Amazon Bedrock Converse API for model interactions. Models must support:- ✅ Converse - Basic conversation API
- ✅ ConverseStream - Streaming responses
- ✅ Tool use - Function calling for penetration testing tools
- ✅ Streaming tool use - Real-time tool execution feedback
Model Selection by Agent Type
PentAGI’s default Bedrock configuration leverages Claude models:| Agent Type | Default Model | Requests/Min (New Account) | Use Case |
|---|---|---|---|
| Primary Agent | claude-sonnet-4 | 2 | Core penetration testing |
| Simple tasks | claude-3-5-haiku | 20 | Quick queries |
| Coder | claude-sonnet-4 | 2 | Exploit development |
| Pentester | claude-sonnet-4 | 2 | Dedicated testing |
IAM Permissions
Your AWS IAM user or role needs these permissions:Regional Model Availability
Not all models are available in all regions. Check availability:- us-east-1 (N. Virginia) - Widest model selection
- us-west-2 (Oregon) - Most major models
- eu-west-1 (Ireland) - European data residency
- ap-northeast-1 (Tokyo) - Asia-Pacific availability
Provisioned Throughput
For high-volume penetration testing, consider provisioned throughput:- Purchase model units in AWS Bedrock console
- Create provisioned model ARN
- Use provisioned ARN in your configuration
- Guaranteed throughput
- No rate limits
- Predictable pricing
- Lower per-token cost at scale
Advanced Configuration
Customize Bedrock models using YAML configuration:Troubleshooting
Access Denied Errors
- Verify IAM permissions include
bedrock:InvokeModel - Check model is available in your region
- Ensure model access is enabled in Bedrock console
Rate Limit Errors
- Check current quotas in Service Quotas console
- Request quota increase (typically approved within 24-48 hours)
- Consider provisioned throughput for guaranteed capacity
- Switch to models with higher default limits
Model Not Found
- Verify model availability in your region:
- Enable model access in Bedrock console
- Check model ID format (some use versioned IDs)
VPC Endpoint Issues
If using VPC endpoints:- Ensure endpoint policy allows Bedrock actions
- Verify security group rules
- Check route tables for VPC endpoint
- Use custom endpoint URL in
BEDROCK_SERVER_URL
Cost Optimization
Strategies for cost-effective Bedrock usage:- Use appropriate model sizes - Don’t use large models for simple tasks
- Enable caching - Leverage PentAGI’s built-in caching
- Monitor usage - Track costs in AWS Cost Explorer
- Set budgets - Configure AWS Budgets alerts
- Consider provisioned throughput - Lower per-token cost at scale