Try Bifrost Enterprise free for 14 days.
Request access

How to Get AWS Bedrock API Key

Set up AWS Bedrock through IAM, configure credentials, and integrate with Bifrost for cost tracking and multi-model governance. Complete in 10 minutes.

AWS SetupIAM ConfigurationAccess KeysModel AccessBifrost Integration

AWS Bedrock provider summary

Bifrost supports AWS Bedrock models through AWS SDK and IAM authentication. Bedrock provides access to multiple foundation models from leading providers.

PropertyDetails
DescriptionAWS Bedrock provides serverless access to foundation models including Claude, Llama, and others for text, image, and code generation.
Provider route on Bifrostbedrock/<model>
Provider docAWS Bedrock Documentation
API endpoint for providerbedrock.*.amazonaws.com
Supported endpoints/v1/models, /v1/completions, /v1/chat/completions, /v1/responses, /v1/images/generations, /v1/images/edits, /v1/images/variations, /v1/embeddings, /v1/files, /v1/batches, /v1/count-tokens, /v1/rerank
Auth methodAWS IAM Credentials

Official AWS Resources

Use these AWS-hosted links for console access, API documentation, and authentication details.

Prerequisites

Before you begin, you will need:

AWS accountAbility to access AWS consoleIAM permissions to create users and keys
i
AWS free tier: AWS offers a free tier including Bedrock credits for new customers. Start for free with qualifying usage.

[ QUICK START ]

How Do You Get AWS Bedrock Access in 5 Steps?

1

Create or sign into your AWS account

Visit aws.amazon.com and create a new account or sign in.

Go to aws.amazon.com and create a new account or sign in to your existing account.

2

Request access to Bedrock foundation models

Enable models you want to use in the Bedrock console.

Navigate to the Bedrock console and go to "Model access". Request access to the foundation models you want to use (Claude, Llama, etc).

3

Create an IAM user for Bedrock

Create a dedicated user with Bedrock permissions.

In the IAM console, create a new user and attach the BedrockFullAccess policy for development, or a more restrictive policy for production.

i
Best practice: Create a dedicated IAM user for Bedrock API access instead of using root credentials.
4

Create and copy access keys

Generate access key ID and secret access key.

In the IAM user details, go to "Security credentials" and create a new access key. Copy both the Access Key ID and Secret Access Key immediately.

!
Never share your secret access key: The secret is only displayed once. Store it securely and never commit to version control.
5

Make your first Bedrock API call

Authenticate with AWS SDK and invoke a model.

Use your AWS credentials with the Bedrock SDK:

python
import boto3

client = boto3.client(
  'bedrock-runtime',
  region_name='us-east-1'
)

response = client.invoke_model(
  modelId='anthropic.claude-v2',
  body=b'{"prompt": "Hello Bedrock!"}'
)

print(response['body'].read())

[ MODELS ]

Available AWS Bedrock Models

ModelAPI IDProviderBest for
Jamba 1.5 Largeai21.jamba-1-5-large-v1:0AI21 LabsComplex reasoning across long documents (256K context).
Jamba 1.5 Miniai21.jamba-1-5-mini-v1:0AI21 LabsFaster, lower-cost Jamba workloads.
Nova 2 Liteamazon.nova-2-lite-v1:0AmazonLow-latency multimodal tasks with Nova 2.
Nova 2 Sonicamazon.nova-2-sonic-v1:0AmazonReal-time speech and audio interactions.
Nova Liteamazon.nova-lite-v1:0AmazonFast, cost-effective multimodal workloads.
Nova Microamazon.nova-micro-v1:0AmazonUltra-low-latency text generation.
Nova Premieramazon.nova-premier-v1:0AmazonHighest-capability Amazon Nova for complex tasks.
Nova Proamazon.nova-pro-v1:0AmazonBalanced accuracy, speed, and cost across text, image, and video.
Nova Sonicamazon.nova-sonic-v1:0AmazonSpeech-to-speech and conversational audio.
Nova Canvasamazon.nova-canvas-v1:0AmazonImage generation and editing.
Nova Reelamazon.nova-reel-v1:0AmazonVideo generation from text and images.
Nova Multimodal Embeddingsamazon.nova-multimodal-embeddings-v1:0AmazonMultimodal search and retrieval embeddings.
Titan Text Largeamazon.titan-text-express-v1AmazonGeneral-purpose text generation on Titan.
Titan Text Embeddings V2amazon.titan-embed-text-v2:0AmazonText embeddings for RAG and semantic search.
Titan Embeddings G1 - Textamazon.titan-embed-text-v1AmazonLegacy text embedding workloads.
Titan Multimodal Embeddings G1amazon.titan-embed-image-v1AmazonImage and text combined embeddings.
Titan Image Generator G1 v2amazon.titan-image-generator-v2:0AmazonImage generation with Titan.
Claude Opus 4.7anthropic.claude-opus-4-7AnthropicFlagship coding, agents, and enterprise workflows (1M context).
Claude Opus 4.6anthropic.claude-opus-4-6-v1AnthropicTop-tier reasoning and long-running agentic tasks.
Claude Sonnet 4.6anthropic.claude-sonnet-4-6AnthropicBalanced performance for production agents and coding.
Claude Sonnet 4.5anthropic.claude-sonnet-4-5-20250929-v1:0AnthropicAgents, coding, and computer use with strong benchmarks.
Claude Haiku 4.5anthropic.claude-haiku-4-5-20251001-v1:0AnthropicFast, cost-efficient Claude for high-volume workloads.
Claude Opus 4.5anthropic.claude-opus-4-5-20251101-v1:0AnthropicAdvanced reasoning with extended thinking support.
Claude Sonnet 4anthropic.claude-sonnet-4-20250514-v1:0AnthropicStrong general-purpose Claude 4 generation.
Claude Opus 4.1anthropic.claude-opus-4-1-20250805-v1:0AnthropicHigh-intelligence tasks requiring Opus-class capability.
Claude 3.5 Haikuanthropic.claude-3-5-haiku-20241022-v1:0AnthropicFast Claude 3.5 tier for latency-sensitive apps.
Claude 3 Haikuanthropic.claude-3-haiku-20240307-v1:0AnthropicLightweight Claude 3 for simple, fast tasks.
Claude Mythos Previewanthropic.claude-mythos-previewAnthropicPreview model for early-access evaluation.
Command R+cohere.command-r-plus-v1:0CohereComplex RAG and multi-step tool use.
Command Rcohere.command-r-v1:0CohereRAG and conversational AI at lower cost than R+.
Rerank 3.5cohere.rerank-v3-5:0CohereImproving retrieval ranking in RAG pipelines.
Embed v4cohere.embed-v4:0CohereLatest-generation Cohere embeddings.
Embed Englishcohere.embed-english-v3CohereEnglish-only embedding workloads.
Embed Multilingualcohere.embed-multilingual-v3CohereMultilingual embedding and search.
DeepSeek V3.2deepseek.v3-2-v1:0DeepSeekLatest DeepSeek general and coding performance.
DeepSeek-V3.1deepseek.v3-1-v1:0DeepSeekStrong open-weight-class performance on Bedrock.
DeepSeek-R1deepseek.r1-v1:0DeepSeekChain-of-thought reasoning for math, code, and logic.
Gemma 3 27B PTgoogle.gemma-3-27b-pt-v1:0GoogleLarger Gemma 3 pre-trained base workloads.
Gemma 3 12B ITgoogle.gemma-3-12b-it-v1:0GoogleInstruction-tuned Gemma 3 for chat and assistants.
Gemma 3 4B ITgoogle.gemma-3-4b-it-v1:0GoogleCompact Gemma 3 for edge and high-volume use.
Llama 4 Maverick 17B Instructmeta.llama4-maverick-17b-instruct-v1:0MetaLatest Llama 4 family for general instruction following.
Llama 4 Scout 17B Instructmeta.llama4-scout-17b-instruct-v1:0MetaEfficient Llama 4 variant for exploration and routing.
Llama 3.3 70B Instructmeta.llama3-3-70b-instruct-v1:0MetaStrong open-model reasoning and coding (128K context).
Llama 3.2 90B Instructmeta.llama3-2-90b-instruct-v1:0MetaMultimodal-capable large Llama 3.2.
Llama 3.2 11B Instructmeta.llama3-2-11b-instruct-v1:0MetaBalanced Llama 3.2 for vision and text.
Llama 3.2 3B Instructmeta.llama3-2-3b-instruct-v1:0MetaSmall multimodal Llama for low latency.
Llama 3.2 1B Instructmeta.llama3-2-1b-instruct-v1:0MetaOn-device-class Llama 3.2 workloads.
Llama 3.1 405B Instructmeta.llama3-1-405b-instruct-v1:0MetaLargest Llama 3.1 for maximum capability.
Llama 3.1 70B Instructmeta.llama3-1-70b-instruct-v1:0MetaProduction Llama 3.1 at scale.
Llama 3.1 8B Instructmeta.llama3-1-8b-instruct-v1:0MetaCost-efficient Llama 3.1 inference.
Llama 3 70B Instructmeta.llama3-70b-instruct-v1:0MetaLlama 3 generation general workloads.
Llama 3 8B Instructmeta.llama3-8b-instruct-v1:0MetaLightweight Llama 3 chat and completion.
MiniMax M2.5minimax.m2-5-v1:0MiniMaxLatest MiniMax general and agent workloads.
MiniMax M2.1minimax.m2-1-v1:0MiniMaxPrior-generation MiniMax at lower cost.
MiniMax M2minimax.m2-v1:0MiniMaxEntry MiniMax tier on Bedrock.
Mistral Large 3mistral.mistral-large-3-v1:0Mistral AIFlagship Mistral for complex reasoning and agents.
Mistral Largemistral.mistral-large-2407-v1:0Mistral AIPrior large Mistral for multilingual tasks.
Mistral Smallmistral.mistral-small-2402-v1:0Mistral AICost-efficient Mistral for high volume.
Ministral 3 8Bmistral.ministral-3-8b-v1:0Mistral AICompact Mistral 3 generation.
Ministral 3Bmistral.ministral-3b-v1:0Mistral AIUltra-efficient edge-style inference.
Ministral 14B 3.0mistral.ministral-14b-3-0-v1:0Mistral AIMid-size Ministral with strong efficiency.
Devstral 2 123Bmistral.devstral-2-123b-v1:0Mistral AILarge code-agent and software engineering tasks.
Magistral Small 2509mistral.magistral-small-2509-v1:0Mistral AIReasoning-focused smaller Magistral tier.
Pixtral Largemistral.pixtral-large-2502-v1:0Mistral AIVision-language and multimodal inputs.
Voxtral Mini 3B 2507mistral.voxtral-mini-3b-2507-v1:0Mistral AICompact audio-to-text transcription.
Voxtral Small 24B 2507mistral.voxtral-small-24b-2507-v1:0Mistral AIHigher-quality speech understanding.
Mistral 7B Instructmistral.mistral-7b-instruct-v0:2Mistral AILegacy lightweight Mistral instruct model.
Mixtral 8x7B Instructmistral.mixtral-8x7b-instruct-v0:1Mistral AIMoE instruct model for diverse tasks.
Kimi K2.5moonshot.kimi-k2-5-v1:0Moonshot AILatest Kimi for long-context and agent tasks.
Kimi K2 Thinkingmoonshot.kimi-k2-thinking-v1:0Moonshot AIReasoning-heavy Kimi workloads.
NVIDIA Nemotron 3 Super 120Bnvidia.nemotron-super-3-120b-v1:0NVIDIALarge Nemotron for enterprise agents.
Nemotron Nano 3 30Bnvidia.nemotron-nano-3-30b-v1:0NVIDIAMid-size Nemotron for balanced cost and quality.
NVIDIA Nemotron Nano 9B v2nvidia.nemotron-nano-9b-v2-v1:0NVIDIAEfficient Nemotron for high throughput.
NVIDIA Nemotron Nano 12B v2 VL BF16nvidia.nemotron-nano-12b-v2-vl-bf16-v1:0NVIDIAVision-language Nemotron workloads.
gpt-oss-120bopenai.gpt-oss-120b-v1:0OpenAILarge open-weight GPT-OSS on Bedrock.
gpt-oss-20bopenai.gpt-oss-20b-v1:0OpenAISmaller GPT-OSS for cost-sensitive workloads.
GPT OSS Safeguard 120Bopenai.gpt-oss-safeguard-120b-v1:0OpenAISafety-classified large GPT-OSS variant.
GPT OSS Safeguard 20Bopenai.gpt-oss-safeguard-20b-v1:0OpenAISafety-classified compact GPT-OSS variant.
Qwen3 Coder 480B A35B Instructqwen.qwen3-coder-480b-a35b-instruct-v1:0QwenLarge MoE coding model on Bedrock.
Qwen3 VL 235B A22Bqwen.qwen3-vl-235b-a22b-v1:0QwenVision-language Qwen at scale.
Qwen3 235B A22B 2507qwen.qwen3-235b-a22b-2507-v1:0QwenFlagship Qwen3 text reasoning.
Qwen3 Next 80B A3Bqwen.qwen3-next-80b-a3b-v1:0QwenNext-gen Qwen3 architecture.
Qwen3 32Bqwen.qwen3-32b-v1:0QwenDense Qwen3 for production chat.
Qwen3 Coder Nextqwen.qwen3-coder-next-v1:0QwenLatest Qwen coding-focused model.
Qwen3-Coder-30B-A3B-Instructqwen.qwen3-coder-30b-a3b-instruct-v1:0QwenMid-size Qwen coder for balanced spend.
Stable Image Conservative Upscalestability.stable-image-conservative-upscale-v1:0Stability AISubtle image upscaling.
Stable Image Creative Upscalestability.stable-image-creative-upscale-v1:0Stability AICreative detail enhancement when upscaling.
Stable Image Fast Upscalestability.stable-image-fast-upscale-v1:0Stability AIQuick upscaling pipelines.
Stable Image Control Sketchstability.stable-image-control-sketch-v1:0Stability AISketch-guided image generation.
Stable Image Control Structurestability.stable-image-control-structure-v1:0Stability AIStructure-preserving image edits.
Stable Image Erase Objectstability.stable-image-erase-object-v1:0Stability AIObject removal from images.
Stable Image Inpaintstability.stable-image-inpaint-v1:0Stability AIMasked region inpainting.
Stable Image Outpaintstability.stable-image-outpaint-v1:0Stability AIExtending image borders.
Stable Image Remove Backgroundstability.stable-image-remove-background-v1:0Stability AIBackground removal.
Stable Image Search and Recolorstability.stable-image-search-recolor-v1:0Stability AISemantic recoloring from prompts.
Stable Image Search and Replacestability.stable-image-search-replace-v1:0Stability AIPrompt-based object replacement.
Stable Image Style Guidestability.stable-image-style-guide-v1:0Stability AIStyle-consistent generation.
Stable Image Style Transferstability.stable-image-style-transfer-v1:0Stability AIApplying reference styles to images.
Pegasus v1.2twelvelabs.pegasus-v1-2-v1:0TwelveLabsVideo understanding and captioning.
Marengo Embed 3.0twelvelabs.marengo-embed-3-0-v1:0TwelveLabsLatest video embedding search.
Marengo Embed v2.7twelvelabs.marengo-embed-v2-7-v1:0TwelveLabsPrior Marengo video embeddings.
Palmyra X5writer.palmyra-x5-v1:0WriterLatest Palmyra enterprise text model.
Palmyra X4writer.palmyra-x4-v1:0WriterPrior Palmyra generation for business writing.
Palmyra Vision 7Bwriter.palmyra-vision-7b-v1:0WriterVision-capable Palmyra for document AI.
GLM 5zai.glm-5-v1:0Z.AILatest GLM flagship on Bedrock.
GLM 4.7zai.glm-4-7-v1:0Z.AIStrong GLM 4.7 general reasoning.
GLM 4.7 Flashzai.glm-4-7-flash-v1:0Z.AILow-latency GLM 4.7 variant.

Model IDs are in-region identifiers; geo and global inference prefixes (for example us., global.) may apply. Availability varies by AWS Region, confirm access in the Bedrock console and see the official models catalog for the latest list and pricing.

[ TROUBLESHOOTING ]

Troubleshooting Common Bedrock Errors

ErrorLikely CauseWhat to Do
AccessDeniedIAM user lacks Bedrock permissions.Attach BedrockFullAccess or appropriate permissions to the IAM user.
ModelNotFoundModel not enabled or wrong region.Enable the model in Bedrock console. Verify you're in the correct region.
ThrottlingExceptionRate limit exceeded.Implement exponential backoff. Use Bifrost for load distribution.

[ PRODUCTION-READY ]

Use Your Bedrock Key with Bifrost

Bifrost is a drop-in replacement for AWS Bedrock SDKs. Update your base URL and keep your client code. Bifrost handles cost tracking, virtual keys, budgets, and intelligent failover.

Step 1: Start Bifrost and register Bedrock

Run the Bifrost gateway and configure your Bedrock credentials in the Web UI.

Terminal
$ npx -y @maximhq/bifrost
OUTPUT
 Bifrost started
├─ HTTP server listening on http://localhost:8080
├─ Web UI available at   http://localhost:8080
└─ Configure providers and virtual keys in the dashboard
Add the Bedrock integration in the Web UI. For details, read Bedrock on Bifrost.

Step 2: Point your Bedrock SDK at Bifrost

Update your SDK to route through Bifrost's AWS-compatible gateway.

example.py
import boto3

# BEFORE
# client = boto3.client('bedrock-runtime', region_name='us-east-1')

# AFTER: route via Bifrost + virtual key
client = boto3.client(
    'bedrock-runtime',
    region_name='us-east-1',
    endpoint_url='http://localhost:8080/bedrock'
)

response = client.invoke_model(
    modelId='anthropic.claude-v2',
    body=b'{"prompt": "Hello from Bifrost!"}'
)

print(response['body'].read())
Virtual keys can be managed in the Bifrost Web UI. Configure per-developer cost tracking and budgets.

Ready to Route Bedrock Through Bifrost?

Bifrost is open source and production-ready. Get started in minutes with cost tracking, virtual keys, and failover built in.

[ BIFROST FEATURES ]

Open Source & Enterprise

Everything you need to run AI in production, from free open source to enterprise-grade features.

01 Governance

SAML support for SSO and Role-based access control and policy enforcement for team collaboration.

02 Adaptive Load Balancing

Automatically optimizes traffic distribution across provider keys and models based on real-time performance metrics.

03 Cluster Mode

High availability deployment with automatic failover and load balancing. Peer-to-peer clustering where every instance is equal.

04 Alerts

Real-time notifications for budget limits, failures, and performance issues on Email, Slack, PagerDuty, Teams, Webhook and more.

05 Log Exports

Export and analyze request logs, traces, and telemetry data from Bifrost with enterprise-grade data export capabilities for compliance, monitoring, and analytics.

06 Audit Logs

Comprehensive logging and audit trails for compliance and debugging.

07 Vault Support

Secure API key management with HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault integration.

08 VPC Deployment

Deploy Bifrost within your private cloud infrastructure with VPC isolation, custom networking, and enhanced security controls.

09 Guardrails

Automatically detect and block unsafe model outputs with real-time policy enforcement and content moderation across all agents.

[ SHIP RELIABLE AI ]

Try Bifrost Enterprise with a 14-day Free Trial

[quick setup]

Drop-in replacement for any AI SDK

Change just one line of code. Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more.

1import os
2from anthropic import Anthropic
3
4anthropic = Anthropic(
5 api_key=os.environ.get("ANTHROPIC_API_KEY"),
6 base_url="https://<bifrost_url>/anthropic",
7)
8
9message = anthropic.messages.create(
10 model="claude-3-5-sonnet-20241022",
11 max_tokens=1024,
12 messages=[
13 {"role": "user", "content": "Hello, Claude"}
14 ]
15)
Drop in once, run everywhere.

[ FAQ ]

Frequently Asked Questions

Yes. AWS Bedrock is an AWS service that requires an active AWS account. Start with the AWS free tier which includes Bedrock credits for new customers.

AWS Bedrock is available in us-east-1, us-west-2, eu-west-1, and other regions. Choose the region closest to your application for lowest latency.

Log in to the AWS IAM console, navigate to Users, select your user, go to Security credentials, and create a new access key. Store the credentials securely.

Yes. AWS Bedrock works with temporary security credentials from STS, which is ideal for applications running on EC2, Lambda, and other AWS services.

Use AWS Cost Explorer and CloudWatch to monitor Bedrock usage. For cross-provider cost tracking, route through Bifrost for unified dashboards.

On-demand pricing is pay-per-use. Provisioned throughput offers discounts for predictable, sustained usage. Use Bifrost to manage both modes across providers.