Build a serverless Amazon Bedrock batch job orchestration workflow using AWS Step Functions
AWS•How-to••by Swagat Kulkarni, Evan Diewald and Shreyas Subramanian•AWS Artificial Intelligence Blog
In this post, we introduce a flexible and scalable solution that simplifies the batch inference workflow. This solution provides a highly scalable approach to managing your FM batch inference needs, such as generating embeddings for millions of documents or running custom evaluation or completion tasks with large datasets.
A CDK-deployed serverless pattern uses Step Functions, DynamoDB and Lambda to run Bedrock batch inference jobs in parallel over large datasets, with preprocessing and postprocessing.
Who it is for
Teams running large Bedrock batch inference, such as embedding or labeling millions of rows, that need to manage job quotas and concurrency.
Key points
Batch inference is described as 50% cheaper than on-demand processing.
Each batch input is 1,000 to 50,000 records at the time of writing; quota increases go through Service Quotas.
Titan Text Embeddings V2 batch jobs are capped at 20 in-progress or submitted jobs per Region.
Authors' test: 2.2 million rows across 45 jobs took about 27 hours with Claude 3.5 Haiku in us-east-1.
AI:Amazon Payments used a multi-objective contextual bandit (LinUCB) on SageMaker AI to personalize an acquisition funnel, with weekly batch updates and precomputed recommendations served from a key-value store.
AI:SageMaker Unified Studio Workflows adds 19 visual operators to orchestrate Bedrock guardrails, S3 Tables, S3 Vectors, Glue Data Catalog and MWAA Serverless without custom code.
AI:Gives a practical setup for SageMaker AI training jobs on P6-B200 instances, covering batch size, sequence length, activation checkpointing, and precision choice by model size.