AWS Machine Learning Blog 09月25日
亚马逊云Bedrock批量推理监控管理
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

亚马逊云Bedrock批量推理服务通过批量处理大量数据,提供比按需推理更低50%的成本,适用于历史数据分析、大规模文本摘要等非实时任务。本文介绍了如何使用CloudWatch监控和管理批量推理作业,包括关键指标、最佳实践和实际案例,帮助用户优化性能、成本和运营效率。

🔍亚马逊云Bedrock批量推理支持多种模型家族,包括Anthropic的Claude Sonnet 4和OpenAI OSS模型,通过CloudWatch可实时监控作业进度,包括待处理记录数、输入输出token处理速度等,提供AWS账户级可见性。

⏱️批量推理适用于非实时任务,如每日/每周大规模数据摘要、历史数据分析和知识库增强,通过监控吞吐量指标(如输入输出token每分钟处理数)可优化成本,避免因处理速度过低触发自动化警报。

📊用户可通过CloudWatch控制台或Metrics Insights查询AWS/Bedrock/Batch命名空间下的关键指标,如待处理token数、每分钟处理记录数等,并通过设置警报(如输入token处理速度超过阈值)触发通知或自动化操作,提升运营效率。

🚀批量推理作业可通过AWS管理控制台、SDK或CLI启动,支持选择模型、输入输出S3存储位置和服务授权方式,新功能包括模型支持扩展、性能提升和作业监控增强,帮助用户快速处理大规模工作负载。

💡最佳实践建议结合成本监控和性能跟踪,通过分析吞吐量指标预估费用,并利用待处理记录数指标触发通知,同时监控处理速度变化,必要时调整作业规模或切换到按需处理以保障任务按时完成。

As organizations scale their use of generative AI, many workloads require cost-efficient, bulk processing rather than real-time responses. Amazon Bedrock batch inference addresses this need by enabling large datasets to be processed in bulk with predictable performance—at 50% lower cost than on-demand inference. This makes it ideal for tasks such as historical data analysis, large-scale text summarization, and background processing workloads.

In this post, we explore how to monitor and manage Amazon Bedrock batch inference jobs using Amazon CloudWatch metrics, alarms, and dashboards to optimize performance, cost, and operational efficiency.

New features in Amazon Bedrock batch inference

Batch inference in Amazon Bedrock is constantly evolving, and recent updates bring significant enhancements to performance, flexibility, and cost transparency:

Use cases for batch inference

AWS recommends using batch inference in the following use cases:

Launch an Amazon Bedrock batch inference job

You can start a batch inference job in Amazon Bedrock using the AWS Management Console, AWS SDKs, or AWS Command Line Interface (AWS CLI). For detailed instructions, see Create a batch inference job.

To use the console, complete the following steps:

    On the Amazon Bedrock console, choose Batch inference under Infer in the navigation pane. Choose Create batch inference job. For Job name, enter a name for your job. For Model, choose the model to use. For Input data, enter the location of the Amazon Simple Storage Service (Amazon S3) input bucket (JSONL format). For Output data, enter the S3 location of the output bucket. For Service access, select your method to authorize Amazon Bedrock. Choose Create batch inference job.

Monitor batch inference with CloudWatch metrics

Amazon Bedrock now automatically publishes metrics for batch inference jobs under the AWS/Bedrock/Batch namespace. You can track batch workload progress at the AWS account level with the following CloudWatch metrics. For current Amazon Bedrock models, these metrics include records pending processing, input and output tokens processed per minute, and for Anthropic Claude models, they also include tokens pending processing.

The following metrics can be monitored by modelId:

To view these metrics using the CloudWatch console, complete the following steps:

    On the CloudWatch console, choose Metrics in the navigation pane. Filter metrics by AWS/Bedrock/Batch. Select your modelId to view detailed metrics for your batch job.

To learn more about how to use CloudWatch to monitor metrics, refer to Query your CloudWatch metrics with CloudWatch Metrics Insights.

Best practices for monitoring and managing batch inference

Consider the following best practices for monitoring and managing your batch inference jobs:

Example of CloudWatch metrics

In this section, we demonstrate how you can use CloudWatch metrics to set up proactive alerts and automation.

For example, you can create a CloudWatch alarm that sends an Amazon Simple Notification Service (Amazon SNS) notification when the average NumberOfInputTokensProcessedPerMinute exceeds 1 million within a 6-hour period. This alert could prompt an Ops team review or trigger downstream data pipelines.

The following screenshot shows that the alert has In alarm status because the batch inference job met the threshold. The alarm will trigger the target action, in our case an SNS notification email to the Ops team.

The following screenshot shows an example of the email the Ops team received, notifying them that the number of processed tokens exceeded their threshold.

You can also build a CloudWatch dashboard displaying the relevant metrics. This is ideal for centralized operational monitoring and troubleshooting.

Conclusion

Amazon Bedrock batch inference now offers expanded model support, improved performance, deeper visibility into the progress of your batch workloads, and enhanced cost monitoring.

Get started today by launching an Amazon Bedrock batch inference job, setting up CloudWatch alarms, and building a monitoring dashboard, so you can maximize efficiency and value from your generative AI workloads.


About the authors

Vamsi Thilak Gudi is a Solutions Architect at Amazon Web Services (AWS) in Austin, Texas, helping Public Sector customers build effective cloud solutions. He brings diverse technical experience to show customers what’s possible with AWS technologies. He actively contributes to the AWS Technical Field Community for Generative AI.

Yanyan Zhang is a Senior Generative AI Data Scientist at Amazon Web Services, where she has been working on cutting-edge AI/ML technologies as a Generative AI Specialist, helping customers use generative AI to achieve their desired outcomes. Yanyan graduated from Texas A&M University with a PhD in Electrical Engineering. Outside of work, she loves traveling, working out, and exploring new things.

Avish Khosla is a software developer on Bedrock’s Batch Inference team, where the team build reliable, scalable systems to run large-scale inference workloads on generative AI models. he care about clean architecture and great docs. When he is not shipping code, he is on a badminton court or glued to a good cricket match.

Chintan Vyas serves as a Principal Product Manager–Technical at Amazon Web Services (AWS), where he focuses on Amazon Bedrock services. With over a decade of experience in Software Engineering and Product Management, he specializes in building and scaling large-scale, secure, and high-performance Generative AI services. In his current role, he leads the enhancement of programmatic interfaces for Amazon Bedrock. Throughout his tenure at AWS, he has successfully driven Product Management initiatives across multiple strategic services, including Service Quotas, Resource Management, Tagging, Amazon Personalize, Amazon Bedrock, and more. Outside of work, Chintan is passionate about mentoring emerging Product Managers and enjoys exploring the scenic mountain ranges of the Pacific Northwest.

Mayank Parashar is a Software Development Manager for Amazon Bedrock services.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

亚马逊云 Bedrock 批量推理 CloudWatch 成本优化 AI工作负载
相关文章