Amazon Bedrock 将 Claude 模型扩展至印度境内推理
英文标题:Amazon Bedrock expands Claude model availability to in-country inferencing in India
Anthropic 的 Claude Opus 5、Claude Sonnet 5 和 Claude Haiku 4.5 现已通过 Amazon Bedrock 面向印度提供服务。借助印度地理跨区域推理(geographic cross-Region inference),请求仅会在孟买区域(ap-south-1)和海得拉巴区域(ap-south-2)之间路由,从而支持在印度境内处理推理数据。该能力可通过 Amazon Bedrock 控制台、Anthropic Messages API、InvokeModel API 和 Converse API 使用。对开发者而言,这意味着可在满足本地数据处理要求的同时,利用跨区域计算容量提升生成式 AI 应用的吞吐量、弹性与高峰期稳定性。
1.3 MB
101.1 KB
124.1 KB
345.0 KB
141.2 KB
346.5 KB
320.0 KB
16.4 KB
16.7 KB
16.2 KB
57.4 KB
56.1 KB
中文
我们很高兴宣布,Anthropic 的 Claude Opus 5、Claude Sonnet 5 和 Claude Haiku 4.5 现已在印度推出。印度区域端点通过地理跨区域推理提供服务。除已支持的全球跨区域推理外,印度客户现在还可以在 Amazon Bedrock 上访问这些模型,同时在印度区域内处理数据。当客户需要满足在指定地理区域本地处理数据的要求时,这项能力尤其有用。
本文将介绍,Amazon Bedrock 上 Anthropic Claude 模型的印度地理跨区域推理如何从孟买和海得拉巴区域运行。我们还将展示如何从 Amazon Bedrock 控制台以及通过代码开始使用,包括采用 Anthropic 的 Messages API、Amazon Bedrock InvokeModel API 和 Converse API。
印度推理
为了帮助您实现 AI 应用的规模化,Amazon Bedrock 提供跨区域推理配置文件。这项功能可将推理分配至多个 AWS 区域,而无需您管理各区域中的容量。请求从您发起 API 调用的源区域开始,并自动路由至推理配置文件中定义的某个目标区域。印度地理配置文件会将推理限定在印度境内。请求仅在 ap-south-1 和 ap-south-2 之间路由。您的输入提示词和输出结果可能会在这两个区域之间传输。
您的请求不再受限于单一区域的容量,而是可以使用更广泛的计算资源池。这有助于您在负载下维持吞吐量和稳定性能,在流量高峰期间尤为重要。跨区域推理通过安全的 AWS 网络运行,并为传输中的数据提供端到端加密。使用跨区域推理时,客户数据不会存储在目标区域,而是始终仅保留在源区域。
Amazon Bedrock 采用零数据保留(ZDR)数据安全模型。这意味着,默认情况下,Amazon Bedrock 不会存储模型输入或输出。不过,如果内容被自动安全分类器标记,某些模型会要求 AWS 进行人工审核。有关更多详细信息,请参阅 Amazon Bedrock 用户指南中的数据保留。
无论由哪个后端区域处理请求,计费和配额消耗都会计入源区域中的账户。Amazon CloudWatch 和 AWS CloudTrail 仅在源区域记录日志条目,因此您的监控可集中在一处。地理跨区域推理可通过 bedrock-runtime 端点使用。它支持 Anthropic 的 Messages API、原生 Amazon Bedrock InvokeModel 和 Converse API,以及 Amazon Bedrock Guardrails 和智能提示词路由等 Amazon Bedrock 功能。
从 Amazon Bedrock 控制台访问 Claude 模型
您可以在 Amazon Bedrock 控制台的文本 Playground 中访问 Claude 模型,无需编写代码或设置 SDK。您可以发送提示词、调整推理参数,并在不同模型变体之间切换,以便在集成 API 前了解各模型的表现。
- 在您希望用作源区域的区域中打开 Amazon Bedrock 控制台。
- 在导航窗格的 Test 下,选择 Playground。
- 在页面中间选择 Select model。
- 搜索 Anthropic Claude Opus 5,在 Inference 下选择推理配置文件 IN Anthropic Claude Opus 5,然后选择 Apply。
- 输入提示词并选择 Run,以生成响应。
图 1:在 Amazon Bedrock 控制台 Playground 中选中的 Claude Opus 5 模型
使用 Anthropic Messages API 以及 Amazon Bedrock InvokeModel 和 Converse API 调用 Claude 模型
您可以通过 Anthropic SDK,在 bedrock-runtime 上使用 Anthropic Messages API,并采用印度地理推理配置文件 ID,以编程方式访问 Anthropic 的 Claude Opus 5、Claude Sonnet 5 或 Claude Haiku 4.5。您也可以继续通过 AWS Command Line Interface (AWS CLI) 和 AWS SDK,在 bedrock-runtime 上使用 InvokeModel 和 Converse API。
前提条件
- 拥有已启用 Amazon Bedrock 访问权限的 AWS 账户。
- 已安装并配置 AWS CLI。
- Python 3.8 或更高版本。
- 已安装 Boto3:
pip install boto3。 - 已安装 Anthropic SDK:
pip install anthropic。 - 已安装用于 Amazon Bedrock 模型推理身份验证的 Bedrock Token Generator:
pip install aws_bedrock_token_generator。 - AWS Identity and Access Management(IAM)角色或用户拥有使用地理跨区域推理配置文件调用 Amazon Bedrock 模型所需的权限。
以下是一个使用 Python AWS SDK(Boto3)和 InvokeModel API 的快速示例:
import boto3
import json
# Create a Bedrock Runtime client
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-south-1"
)
# Invoke Claude Sonnet 5
response = bedrock_runtime.invoke_model(
modelId="in.anthropic.claude-sonnet-5",
contentType="application/json",
accept="application/json",
body=json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": " Can you explain the features of Amazon Bedrock? "
}
]
})
)
result = json.loads(response["body"].read())
print(result["content"][0]["text"])
您也可以使用 Amazon Bedrock Converse API,获得统一的多模型体验:
import boto3
# Create a Bedrock Runtime client
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-south-1"
)
# Invoke Claude Opus 5
response = bedrock_runtime.converse(
modelId="in.anthropic.claude-opus-5",
messages=[
{
"role": "user",
"content": [
{
"text": " Can you explain the features of Amazon Bedrock?"
}
]
}
],
inferenceConfig={
"maxTokens": 4096
}
)
if 'output' in response:
blocks = response['output']['message']['content']
print('\n'.join(b.get('text', '') for b in blocks if 'text' in b))
您还可以通过 anthropic SDK 软件包使用 Anthropic Messages API,以获得更精简的使用体验:
from anthropic import Anthropic
from aws_bedrock_token_generator import provide_token
token = provide_token(region="ap-south-1")
client = Anthropic(
base_url="https://bedrock-runtime.ap-south-1.amazonaws.com/anthropic",
api_key=token,
)
response = client.messages.create(
model="in. anthropic.claude-haiku-4-5-20251001-v1:0",
max_tokens=1024,
messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}],
)
print(response)
您可以通过 CloudWatch 和 AWS Cost Explorer 监控使用情况、性能和成本,从而随着需求增长扩展应用。
结论
随着 Anthropic Claude Opus 5、Claude Sonnet 5 和 Claude Haiku 4.5 通过支持印度地理跨区域推理的 Amazon Bedrock 推出,您现在可以在将推理保留在本国境内的同时,构建高度可扩展且具备韧性的生成式 AI 应用。要开始使用,请在 Amazon Bedrock 控制台中访问 Anthropic Claude 模型,或使用印度地理推理配置文件 ID 通过 API 调用模型。有关每个区域中模型可用性的最新信息,请参阅 Amazon Bedrock 用户指南中的按模型查看区域可用性。
关于作者
Aamna Najmi
Aamna 是一名专注于生成式 AI 的高级专业解决方案架构师,重点关注 Anthropic 模型,以及在 Amazon Bedrock 上大规模实现生成式 AI 系统的运营和治理。她帮助 ISV 解决挑战、拥抱创新,并借助 Amazon Bedrock 创造新的商业机会。
Eugenio Soltero
Eugenio 是 AWS Amazon Bedrock 的高级产品营销经理。他拥有多年生成式 AI 经验,帮助客户应对不断演变的基础模型和生成式 AI 格局,采用能够带来可衡量价值的解决方案。
Sofian Hamiti
Sofian 是一位技术领导者,拥有超过 12 年构建 AI 解决方案、带领高绩效团队以最大化客户成果的经验。他热衷于赋能多元化人才,推动全球影响力并帮助其实现职业理想。
Ayan Ray
Ayan 是 AWS 的首席合作伙伴解决方案架构师兼 AI 技术负责人,并担任 AWS Anthropic 的全球技术负责人。他的工作处于云架构与人工智能的交汇点,帮助组织在 AWS 上采用并规模化部署 Anthropic 技术。
English / 原文
We’re excited to announce the availability of Anthropic’s Claude Opus 5, Claude Sonnet 5, and Claude Haiku 4.5 in India. The India regional endpoint is served through geographic cross-Region inference. Customers in India can now access these models on Amazon Bedrock while processing the data in the India Regions in addition to the already supported global cross-Region inference. This can be useful when customers need to meet the requirements to process data locally in a desired geography.
In this post, we discuss how India geographic cross-Region inference works from the Mumbai and Hyderabad Regions on Amazon Bedrock for Anthropic Claude models. We also show how to get started from the Amazon Bedrock console and with code, using Anthropic’s Messages API, Amazon Bedrock InvokeModel API, and Converse API.
India inference
To help you achieve the scale of your AI applications, Amazon Bedrock offers cross-Region inference profiles, a feature you can use to distribute inference across multiple AWS Regions without having to manage capacity in each Region. The request originates from your source Region where you make the API call and is automatically routed to one of the destination Regions defined in the inference profile. The India geographic profile keeps inference within India. Requests route only between ap-south-1 and ap-south-2. Your input prompts and output results might move between those two Regions. Instead of being bound to the capacity of one Region, your requests draw on a broader pool of compute. This helps you maintain throughput and consistent performance under load, which matters most during traffic peaks. Cross-Region inference operates through the secure AWS network with end-to-end encryption for data in transit. Customer data is not stored in a destination Region when using cross-Region inference. It remains exclusively within the source Region. Amazon Bedrock uses a zero data retention (ZDR) data security model. This means that by default, Amazon Bedrock does not store model inputs or outputs. However, certain models require human review by AWS as a condition if content is flagged by automatic safety classifiers. For more details, see Data retention in the Amazon Bedrock User Guide. Billing and quota consumption are tracked against your account in the source Region, regardless of which backend Region handled the request. Amazon CloudWatch and AWS CloudTrail record log entries in the source Region only, so your monitoring stays in one place. Geographic cross-Region inference is available on the bedrock-runtime endpoint. It supports Anthropic’s Messages API and the native Amazon Bedrock InvokeModel and Converse APIs, along with Amazon Bedrock features such as Amazon Bedrock Guardrails and intelligent prompt routing.
Access Claude models from the Amazon Bedrock console
You can access Claude models in the text playground in the Amazon Bedrock console, which requires no coding or SDK setup. You can send prompts, adjust inference parameters, and switch between variants to get a feel for each model before you integrate the API.
- Open the Amazon Bedrock console in the Region that you want to use as the source.
- In the navigation pane, under Test , choose Playground.
- Choose Select model in the middle of the page.
- Search for Anthropic Claude Opus 5, select IN Anthropic Claude Opus 5 as the inference profile under Inference , and choose Apply.
- Enter a prompt and choose Run to generate a response.
Figure 1: The Claude Opus 5 model selected in the Amazon Bedrock console playground
Call Claude models with the Anthropic Messages API and Amazon Bedrock InvokeModel and Converse API
You can access Anthropic’s Claude Opus 5, Claude Sonnet 5, or Claude Haiku 4.5 programmatically with the India geographic inference profile ID using the Anthropic Messages API on bedrock-runtime through the Anthropic SDK, or keep using the InvokeModel and Converse APIs on bedrock-runtime through the AWS Command Line Interface (AWS CLI) and AWS SDK.
Prerequisites
- Active AWS account with Amazon Bedrock access.
- AWS CLI installed and configured.
- Python 3.8+.
- Boto3 installed:
pip install boto3. - Anthropic SDK installed:
pip install anthropic. - The Bedrock Token Generator for Amazon Bedrock model inference authentication installed:
pip install aws_bedrock_token_generator. - AWS Identity and Access Management (IAM) role or user has the necessary permissions to invoke Amazon Bedrock models using a geographic cross-Region inference profile.
Here’s a quick example using the AWS SDK for Python (Boto3) with the InvokeModel API:
import boto3
import json
# Create a Bedrock Runtime client
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-south-1"
)
# Invoke Claude Sonnet 5
response = bedrock_runtime.invoke_model(
modelId="in.anthropic.claude-sonnet-5",
contentType="application/json",
accept="application/json",
body=json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 4096,
"messages": [
{
"role": "user",
"content": " Can you explain the features of Amazon Bedrock? "
}
]
})
)
result = json.loads(response["body"].read())
print(result["content"][0]["text"])
You can also use the Amazon Bedrock Converse API for a unified multi-model experience:
import boto3
# Create a Bedrock Runtime client
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-south-1"
)
# Invoke Claude Opus 5
response = bedrock_runtime.converse(
modelId="in.anthropic.claude-opus-5",
messages=[
{
"role": "user",
"content": [
{
"text": " Can you explain the features of Amazon Bedrock?"
}
]
}
],
inferenceConfig={
"maxTokens": 4096
}
)
if 'output' in response:
blocks = response['output']['message']['content']
print('\n'.join(b.get('text', '') for b in blocks if 'text' in b))
You can also use the Anthropic Messages API using the anthropic SDK package for a streamlined experience:
from anthropic import Anthropic
from aws_bedrock_token_generator import provide_token
token = provide_token(region="ap-south-1")
client = Anthropic(
base_url="https://bedrock-runtime.ap-south-1.amazonaws.com/anthropic",
api_key=token,
)
response = client.messages.create(
model="in. anthropic.claude-haiku-4-5-20251001-v1:0",
max_tokens=1024,
messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}],
)
print(response)
You can monitor usage, performance, and costs through CloudWatch and AWS Cost Explorer to scale your applications as demand grows.
Conclusion
With the launch of Anthropic’s Claude Opus 5, Claude Sonnet 5, and Claude Haiku 4.5 using Amazon Bedrock with India geographic cross-Region inference, you can now build highly scalable, resilient generative AI applications while keeping inference within the country. To get started, access Anthropic’s Claude models in the Amazon Bedrock console, or call them with the API using the India geographic inference profile ID. For the most current information about model availability in each Region, see Regional availability by models in the Amazon Bedrock User Guide.
About the authors
Aamna Najmi
Aamna is a Senior Specialist Solutions Architect for Generative AI focusing on Anthropic models and operationalizing and governing generative AI systems at scale on Amazon Bedrock. She helps ISVs solve their challenges, embrace innovation, and create new business opportunities with Amazon Bedrock.
Eugenio Soltero
Eugenio is a Sr. Product Marketing Manager for Amazon Bedrock at AWS. With several years of experience in generative AI, he helps customers navigate the evolving landscape of foundation models and generative AI to adopt solutions that deliver measurable value.
Sofian Hamiti
Sofian is a technology leader with over 12 years of experience building AI solutions, and leading high-performing teams to maximize customer outcomes. He is passionate about empowering diverse talents to drive global impact and achieve their career aspirations.
Ayan Ray
Ayan is a Principal Partner Solutions Architect and AI Tech Lead at AWS, serving as the Worldwide Tech Lead for Anthropic at AWS. He works at the intersection of cloud architecture and Artificial Intelligence, helping organizations adopt and scale Anthropic’s technologies on AWS.
