โ˜๏ธ

Amazon Bedrock

Amazon Bedrock is AWS's fully managed service for accessing multiple foundation models โ€” Anthropic's Claude, Meta's Llama, Amazon's own Titan and Nova models, and more โ€” through a single unified API. It sits at #11 among trending AI tags with roughly 4.7% usage share, appealing to teams already built on AWS who want model access without standing up their own GPU infrastructure. AWS handles scaling, security, and provisioning, so you call one API and swap the underlying model with a config change rather than a rewrite.

Quick facts
Type: Managed multi-model AI API service
Made by: Amazon Web Services
License/Access: Proprietary managed cloud service โ€” pay-per-use (per input/output token)
Language/Platform: Accessed via AWS SDKs (boto3 for Python, AWS SDK for JS/Java) and the AWS Console
Primary use case: Adding LLM capabilities to AWS-hosted applications without managing model infrastructure yourself
Jump to: ExampleGetting startedBest for

Example

Bedrock is called through AWS's boto3 SDK. This example invokes Anthropic's Claude model through Bedrock's invoke_model API.

import boto3
import json

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

body = json.dumps({
    "anthropic_version": "bedrock-2023-05-31",
    "max_tokens": 200,
    "messages": [{"role": "user", "content": "Explain S3 vs EBS in one paragraph."}]
})

response = client.invoke_model(
    modelId="anthropic.claude-3-5-sonnet-20241022-v2:0",
    body=body
)

result = json.loads(response["body"].read())
print(result["content"][0]["text"])

Getting started

Enable model access in the Bedrock console for your AWS account, then call the API with the AWS CLI or boto3.

# 1. In the AWS Console: Bedrock -> Model access -> request access to a model

# 2. install boto3
pip install boto3

# 3. quick CLI test
aws bedrock-runtime invoke-model --model-id anthropic.claude-3-5-sonnet-20241022-v2:0 \
  --body '{"anthropic_version":"bedrock-2023-05-31","max_tokens":100,"messages":[{"role":"user","content":"hi"}]}' \
  output.json
Best for: Teams already running production workloads on AWS who want to add LLM features under the same billing, IAM permissions, and compliance boundary โ€” without provisioning their own inference servers or juggling separate vendor accounts.