Amazon Bedrock 在首尔和新加坡推出 Anthropic 模型区域内推理
英文标题:Introducing Anthropic models on Amazon Bedrock for in-region inference in Seoul and Singapore
Amazon Bedrock 现已在首尔区域提供 Claude Opus 5 和 Claude Sonnet 5 的区域内推理,并在新加坡区域提供 Claude Sonnet 5 的区域内推理。推理请求、输入提示和输出结果均在调用的单一 AWS Region 内处理,适合金融服务、医疗和公共部门等具有严格数据驻留要求的场景。开发者可通过 `bedrock-runtime` 端点,使用 Anthropic Messages API、Amazon Bedrock InvokeModel API 或 Converse API 调用这些模型。区域内推理不经过跨区域路由层,但吞吐量受限于当地区域容量,并按该区域的按需价格、服务配额和监控范围执行。
1.3 MB
101.1 KB
124.1 KB
345.0 KB
141.2 KB
346.5 KB
92.5 KB
15.1 KB
21.1 KB
15.8 KB
15.2 KB
57.6 KB
中文
Amazon Bedrock 现已支持在首尔通过 bedrock-runtime 端点进行区域内推理的 Anthropic Claude 模型:Claude Opus 5 和 Claude Sonnet 5,并支持在新加坡通过区域内推理使用 Claude Sonnet 5。如果你在韩国或新加坡有本地数据处理要求,例如来自金融服务、医疗保健和公共部门的要求,现在可以大规模使用这些 Anthropic 模型。Amazon Bedrock 会在你调用的区域内处理推理请求和数据,处理过程不会离开该区域。
本文将介绍如何通过 bedrock-runtime 端点,从亚太地区(首尔)区域(ap-northeast-2)和亚太地区(新加坡)区域(ap-southeast-1)使用区域内推理。我们还将展示如何通过 Amazon Bedrock 控制台和代码快速上手,包括使用 Amazon Bedrock Converse API、InvokeModel API 以及 Anthropic Messages API。
区域内推理
为了帮助你满足 AI 应用的严格数据驻留要求,Amazon Bedrock 提供区域内推理。你的请求完全在指定的单个 AWS Region 内处理,不会离开该区域。当你需要严格的单一区域数据处理时,可以使用此功能。
与跨区域推理配置文件不同,区域内推理没有路由层。你发送到首尔(ap-northeast-2)或新加坡(ap-southeast-1)区域的请求,仅由该区域提供服务。你的输入提示和输出结果在请求的整个生命周期内都留在该区域中。相应地,你的吞吐量受该区域容量限制,请求也受每个区域服务配额的约束。计费遵循所调用区域的标准按需定价。配额消耗、Amazon CloudWatch 指标和 AWS CloudTrail 日志条目均限定在同一个区域内。在监控时,无需考虑源区域与目标区域之间的区别。首尔区域的 Claude Sonnet 5 和 Claude Opus 5,以及新加坡区域的 Claude Sonnet 5,均可通过 bedrock-runtime 端点使用区域内推理。对于新应用,我们建议使用 bedrock-runtime 端点。你可以使用直接模型 ID 调用它,例如 anthropic.claude-opus-5 或 anthropic.claude-sonnet-5。该端点支持 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 下选择 On-Demand,然后选择 Apply。 - 输入提示并选择 Run 以生成响应。
图 1:在 Amazon Bedrock 控制台 Playground 中选中的 Anthropic Opus 5 模型,使用区域内推理
使用 Anthropic Messages API 以及 Amazon Bedrock InvokeModel 和 Converse API 调用 Claude 模型
你可以通过 Anthropic SDK,在 bedrock-runtime 上使用 Anthropic Messages API,以首尔区域内推理方式通过编程调用 Anthropic 的 Claude Opus 5 或 Claude Sonnet 5;也可以继续通过 AWS Command Line Interface(AWS CLI) 和 AWS SDK,在 bedrock-runtime 上使用 Invoke 和 Converse API。
前提条件
- 已启用 Amazon Bedrock 访问权限的 AWS 账户。
- 已安装并配置 AWS CLI。
- Python 3.8+。
- 已安装 Boto3:
pip install boto3。 - 已安装 Anthropic SDK:
pip install anthropic。 - 已安装用于 Amazon Bedrock 身份验证的 Amazon Bedrock Token Generator:
pip install aws_bedrock_token_generator。
以下是一个通过 AWS SDK for Python(Boto3)使用 InvokeModel API 的快速示例:
import boto3
import json
# Create a Bedrock Runtime client with in-region inference in Singapore
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-southeast-1")
# Invoke Claude Sonnet 5
response = bedrock_runtime.invoke_model(
modelId="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 with in-region inference in Seoul
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-northeast-2"
)
# Invoke Claude Opus 5
response = bedrock_runtime.converse(
modelId="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-northeast-2")
client = Anthropic(
base_url="https://bedrock-runtime.ap-northeast-2.amazonaws.com/anthropic",
api_key=token,
)
response = client.messages.create(
model="anthropic.claude-sonnet-5",
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 在 Amazon Bedrock 上推出首尔区域内推理,以及 Claude Sonnet 5 在新加坡推出区域内推理,你现在可以构建满足严格数据驻留要求的生成式 AI 应用。这能将推理保留在你指定的区域内。我们对这项发布感到兴奋,并期待看到你如何利用这些能力加速创新,在各区域提供具有影响力的 AI 驱动体验。有关各区域模型可用性的最新信息,请参阅 Amazon Bedrock 用户指南中的按模型划分的区域可用性。
关于作者
Aamna Najmi
Aamna 是一名专注于生成式 AI 的高级专家解决方案架构师,重点关注 Anthropic 模型,以及在 Amazon Bedrock 上大规模实现生成式 AI 系统的运营和治理。她帮助 ISV 解决挑战、拥抱创新,并借助 Amazon Bedrock 创造新的商业机会。
Alfredo Castillo
Alfredo 是 AWS 的生成式 AI 高级专家解决方案架构师,专注于 Anthropic 模型在 Amazon Bedrock 上的市场推广。他与金融服务客户合作,为分布式系统设计和扩展生成式 AI 解决方案,并将生成式 AI 实验转化为生产工作负载。工作之余,他热爱家庭和耐力运动。
Eugenio Soltero
Eugenio 是 AWS Amazon Bedrock 的高级产品营销经理。他拥有多年生成式 AI 经验,帮助客户应对不断演变的基础模型和生成式 AI 格局,采用能够带来可衡量价值的解决方案。
Sofian Hamiti
Sofian 是一位技术领导者,拥有超过 12 年构建 AI 解决方案和带领高绩效团队以最大化客户成果的经验。他热衷于赋能多元化人才,以推动全球影响力并实现职业抱负。
English / 原文
Amazon Bedrock now supports the Anthropic Claude models: Claude Opus 5 and Claude Sonnet 5 in Seoul and Claude Sonnet 5 in Singapore with in-region inference on the bedrock-runtime endpoint. If you have local data processing requirements in South Korea or Singapore, for example, in financial services, healthcare, and the public sector, you can now use these Anthropic models at scale. Amazon Bedrock processes inference requests and data within the Region you call. The processing does not leave the Region.
In this post, we walk through how in-region inference works from the Asia Pacific (Seoul) Region (ap-northeast-2) and Asia Pacific (Singapore) Region (ap-southeast-1) using the bedrock-runtime endpoint. We also show how to get started from the Amazon Bedrock console and with code, using the Amazon Bedrock Converse API, the InvokeModel API, and the Anthropic Messages API.
In-region inference
To help you meet strict data residency requirements for your AI applications, Amazon Bedrock offers in-region inference. Your request is processed entirely within the single AWS Region you specify, and it does not leave that Region. Use this when you have a need for strict single-Region data processing.
Unlike cross-Region inference profiles, there is no routing layer. The request you send to the Seoul (ap-northeast-2) or Singapore (ap-southeast-1) Region is served by that Region alone. Your input prompts and output results stay within it for the full lifecycle of the request. In exchange, your throughput is bounded by that Region’s capacity. Requests are subject to per-Region service quotas. Billing follows standard on-demand pricing for the Region you call. Quota consumption, Amazon CloudWatch metrics, and AWS CloudTrail log entries are all scoped to that same Region. There is no source-versus-destination distinction to account for in your monitoring. In-region inference for Claude Sonnet 5 and Claude Opus 5 in Seoul and Claude Sonnet 5 in Singapore is available on the bedrock-runtime endpoint. For new applications, we recommend the bedrock-runtime endpoint. You invoke it with the direct model ID, for example, anthropic.claude-opus-5 or anthropic.claude-sonnet-5. It supports Anthropic’s Messages API and the 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 a Region that you want to use as a 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 On-Demand under Inference , and choose Apply. - Enter a prompt and choose Run to generate a response.
Figure 1: The Anthropic Opus 5 model selected in the Amazon Bedrock console playground with in-region inference
Call Claude models with the Anthropic Messages API and Amazon Bedrock InvokeModel and Converse API
You can access Anthropic’s Claude Opus 5 or Claude Sonnet 5 programmatically with Seoul in-region inference using the Anthropic Messages API on the bedrock-runtime through Anthropic SDK or keep using the Invoke and Converse API 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 Amazon Bedrock Token Generator for Amazon Bedrock authentication installed:
pip install aws_bedrock_token_generator.
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 with in-region inference in Singapore
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-southeast-1")
# Invoke Claude Sonnet 5
response = bedrock_runtime.invoke_model(
modelId="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 with in-region inference in Seoul
bedrock_runtime = boto3.client(
service_name="bedrock-runtime",
region_name="ap-northeast-2"
)
# Invoke Claude Opus 5
response = bedrock_runtime.converse(
modelId="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 through 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-northeast-2")
client = Anthropic(
base_url="https://bedrock-runtime.ap-northeast-2.amazonaws.com/anthropic",
api_key=token,
)
response = client.messages.create(
model="anthropic.claude-sonnet-5",
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 and Claude Sonnet 5 on Amazon Bedrock with in-region inference in Seoul, and Claude Sonnet 5 with in-region inference in Singapore, you can now build generative AI applications that have strict data residency requirements. This keeps inference within the Region you want. We are excited about this launch and look forward to seeing how you use these capabilities to accelerate innovation and deliver impactful AI-powered experiences across the Region. 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.
Alfredo Castillo
Alfredo is a Senior Specialist Solutions Architect for Generative AI at AWS, focusing on Anthropic models go-to-market on Amazon Bedrock. He works with Financial Services customers to design and scale generative AI solutions across distributed systems and turn generative AI experiments into production workloads. Outside of work, he is passionate about family and endurance sports.
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.
