AIToday
Large Language ModelsAmazon AI BlogPublished: Aug 20, 2026, 10:01 JST3 min read

AWS shows how to cut idle costs when AI agents process requests

AWS shows how to cut idle costs when AI agents process requests

Key takeaway

  • AWS published guidance on three asynchronous invocation patterns for calling Amazon Bedrock AgentCore agents in serverless pipelines that eliminate idle compute costs.

  • When an AI agent is reasoning through a document or task, a synchronous caller—such as a Lambda function—normally blocks and incurs billing for its entire processing time, even though it is doing nothing.

  • The three patterns release the caller's compute during the wait and resume only when the agent returns a result, shifting the cost from the idle caller to the agent's consumption-based model.

3 Key Points

  1. What happened

    AWS published guidance on three asynchronous invocation patterns for Amazon Bedrock AgentCore agents in serverless pipelines—task-token callback, direct service integration, and durable functions—designed to eliminate idle compute costs while agents reason through tasks.

  2. Why it matters

    When a Lambda function or compute service calls an agent synchronously and waits for a response, it remains billed for its full compute allocation during that idle time, even though the agent itself is not consuming CPU. The three patterns release the caller's compute during the wait, resuming only when the agent returns a result, dramatically reducing costs for workflows like document validation in real-estate financing.

  3. What to watch

    Pattern 2 (direct service integration) removes the Lambda dispatcher entirely by having Step Functions invoke Amazon Bedrock AgentCore directly; Pattern 1 (task-token callback) keeps a Lambda for custom logic but returns in seconds; Pattern 3 (durable functions) expresses the same orchestration as code in a single Lambda using the durable-execution SDK.

Ask the AI about this article →

Context & Analysis

AWS's guidance addresses a fundamental cost asymmetry in serverless AI agent workflows. Amazon Bedrock AgentCore uses a consumption-based model that charges only for memory (and model output tokens) while the agent is idle—it does not bill CPU time during waits on language model generation or external tool calls. The compute service that called the agent, however, has no such behavior: a Lambda, container, or EC2 instance that blocks on a synchronous call holds its entire allocation and incurs billing for every second of that idle time. This mismatch means the caller's cost tracks the agent's runtime, not the agent's actual work. The three patterns AWS describes—task-token callback, direct service integration, and durable functions—all follow the same principle: start the agent, release the caller's compute immediately, and resume only when the agent has a result. The differences are trade-offs in implementation: task-token callback keeps a Lambda in the path for custom logic; direct service integration removes the Lambda entirely by integrating Step Functions directly with AgentCore; and durable functions allow the same orchestration to be expressed as code in a single Lambda rather than a state machine.

FAQ

Why does a blocking Lambda function cost more than an asynchronous one?
A Lambda function that issues a synchronous call to an agent sits blocked on an open connection, holding and paying for its full compute allocation until the agent responds. In contrast, a function that starts the agent and returns is billed only for the brief dispatch—a few seconds—because the function has already shut down while the agent works in the background.
Which pattern removes the Lambda function entirely?
Pattern 2 (direct service integration) eliminates the dispatcher Lambda by having Step Functions call Amazon Bedrock AgentCore directly through its AWS SDK service integration, so the agent's response flows straight into the next state.
How does an agent resume a paused execution after it finishes thinking?
In Pattern 1, the agent calls a Lambda that posts the result and the task token back to Step Functions using SendTaskSuccess. In Pattern 3, the agent resumes the durable function using SendDurableExecutionCallbackSuccess with a callback ID.
Amazon AI BlogRead Original Article

Get the latest Large Language Models news every morning

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytime

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleQUALCOMM stock down 21% in 3 months; AI and auto push seen lifting it to $196

The AI news that matters, in one minute each morning.

Sign up free