Bedrock batch inference can run large offline LLM workloads at roughly half the on-demand price, but the model call is the easy part. A developer who used it to extract 10 structured fields from 6,156 scanned PDFs finished the full run in 36 minutes for roughly $74. The same workload on demand would have cost about twice as much.
The hard part was the orchestration: preparing files, waiting for jobs, collecting results and retrying failures. The project handled that with AWS Lambda durable functions written in plain TypeScript.
How batch inference works
The API is asynchronous and file based. You write requests as JSONL files in S3, call CreateModelInvocationJob with the input and output prefixes, the model ID and an IAM service role, poll GetModelInvocationJob until the job reaches a terminal state, then read the output files from S3. Each input line carries a recordId you choose plus a modelInput matching the usual InvokeModel body.
Jobs have no latency SLA. The default timeout is 24 hours and can be set up to 168. In practice the run was faster than expected. The main job processed all 6,156 records in 20 minutes, while a 200-record trial took about 9 minutes, most of it queueing and validation.

The sharp edges
Several limits shape the design. The limits below were current in November 2026 and several vary by model, so check the model you plan to use.
- Bedrock rejects jobs below a minimum record count. Every supported model checked had a minimum of 100, so a small trailing batch needs an on-demand fallback.
- Each input file can be at most 1 GB, and a job at most 5 GB for most models. The project capped jobs at 4 GB. Its 31 chunk files, about 102 MB each for 200 documents, totaled roughly 3.2 to 3.6 GB.
- Output order is not input order. Results must be joined back by recordId, never by line number.
- A job that times out in the queue ends as Expired with no output. One that times out mid-run ends as PartiallyCompleted, with results written for the finished records and missing ones treated as failures.
- Not every model supports batch. Claude Opus 5.5 is listed as Standard tier only, while Claude Opus 5 supports Batch through cross-region inference profiles. On a 50-document golden set, Opus 5 scored 496 of 500 fields, and 499 of 500 with the final multi-pass pipeline.
IAM adds its own twist. Bedrock needs a separate service role to touch S3, and the Lambda role needs iam:PassRole on it. Cross-region inference profiles also need the foundation model ARN with a region wildcard, or calls fail with an unhelpful access-denied error. Job names are limited to 63 characters of letters, digits and a few symbols.

Why Lambda durable functions
The pipeline has four stages: prepare chunks, branch on record count, submit and wait, then collect and validate. An optional pass can re-run only the items flagged for review.
The developer compared four ways to drive it: a script on a laptop, EventBridge with separate Lambdas, Step Functions, and Lambda durable functions. Step Functions’ Bedrock integration doesn’t cover batch inference with a wait, so the poll loop would need hand-built Wait and Choice states. Looping, grouping and conditional escalation are also clumsy to express there compared with ordinary TypeScript.
Durable functions let the whole workflow live in one handler. The SDK, @aws/durable-execution-sdk-js, supplies ctx.step, ctx.wait and ctx.waitForCondition. When the function waits, it suspends and no Lambda compute is billed, even if Bedrock takes hours. On wake-up, the handler replays from the top and completed steps return saved checkpoint values in milliseconds.
The trade-offs are real. The service launched in late 2025, replay requires deterministic code outside steps, and each stretch of work between waits must fit the function timeout, which was 15 minutes here.

What to do next
Teams with recurring bulk jobs have the most to gain, since savings grow at 10 or 100 times this volume or on a weekly schedule. The complete example, CDK stack and tests are on GitHub, and a local test runner exercises the whole multi-invocation flow in milliseconds.
Before building, confirm that your model supports batch, and keep the minimum record count in a single constant. For a one-off job, a simple script may be enough.
Source: loige.co