AWS Bedrock Integration
AWS Bedrock is Amazon's fully managed service that provides access to foundation models from leading AI companies. This guide shows how to create AWS Bedrock Long-Term API Keys and integrate them with LLM API.
Prerequisites
- An AWS account with Bedrock access enabled
- LLM API account
Overview
AWS Bedrock supports Long-Term API Keys for simplified authentication. These keys provide direct API access without requiring IAM credentials or complex authentication flows.
Create AWS Bedrock Long-Term API Key
Enable Model Access in Bedrock
- Log into the AWS Console
- Navigate to AWS Bedrock service
- Go to Model access in the left sidebar
- Click Manage model access
- Enable the models you want to use (e.g., Claude 3.5, Llama 3)
- Wait for access to be granted (usually instant for most models)
Create Long-Term API Key
- In AWS Bedrock console, navigate to API Keys in the left sidebar
- Click Create Long-Term API Key
- Set expiry date ("Never expires" is recommended)
- Click Generate
- Important: Copy the API key immediately - it's only shown once!
Add to LLM API
Navigate to Provider Keys
- Log into LLM API Dashboard
- Select your organization and project
- Go to Provider Keys in the sidebar
Add AWS Bedrock Provider Key
- Click Add for AWS Bedrock
- Paste your Long-Term API Key
- Select Region Prefix based on where you want to use your models:
- us. - For US regions (
us-east-1, us-west-2)
- eu. - For European regions (
eu-central-1, eu-west-1)
- global. - For global/cross-region endpoints
- Click Add Key
The system will validate your key and confirm the connection.
Test the Integration
Test your integration with a simple API call:
curl -X POST https://api.llmapi.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_LLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "aws-bedrock/claude-3-5-sonnet",
"messages": [
{
"role": "user",
"content": "Hello from AWS Bedrock!"
}
]
}'
Replace YOUR_LLM_API_KEY with your LLM API key.
Available Models
Once configured, you can access all AWS Bedrock models through LLM API:
- Anthropic Claude:
aws-bedrock/claude-3-5-sonnet, aws-bedrock/claude-3-5-haiku
- Meta Llama:
aws-bedrock/llama-3-2-90b, aws-bedrock/llama-3-2-11b
- Amazon Titan:
aws-bedrock/amazon.titan-text-express-v1
- And more...
Browse all available models at llmapi.ai/models
Multi-Region Routing
AWS Bedrock requests can be routed to different regional deployments on a per-request basis via the X-LLMAPI-Region header. See the Multi-Region feature page for details.
Troubleshooting
"Model not available" error
- Verify you've enabled model access in AWS Bedrock console
- Check that the region where you created your key has access to the model
- Some models are only available in specific regions
Rate limiting
- AWS Bedrock has request quotas per model and region
- Monitor usage in AWS Bedrock console
- Consider requesting quota increases for high-volume workloads