AI Cloud Architect

Build a serverless Amazon Bedrock batch job orchestration workflow using AWS Step Functions

AWSHow-to by Swagat Kulkarni, Evan Diewald and Shreyas SubramanianAWS 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.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

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.