Configuring Bedrock AgentCore Runtime V2 Agents with AWS Lambda Web Functions BFF and Cost Analysis

·2026.10.29 16:31

Key point

Web Functions BFF configuration is 49 times cheaper per month than Event Functions, with idle memory management being the key to cost.

1 / 4

Details

  • AgentCore Runtime V2 records P75 cold starts of 1.9–2.0 seconds via snapshot restoration, regardless of image size
  • In a 1 million requests per month scenario, Web Functions BFF costs 4.12 USD, which is approximately 49 times cheaper than Event Functions (200.20 USD)
  • Approximately 81% of total computing costs arise from idle memory, making the reduction of idleRuntimeSessionTimeout the core of cost optimization
  • Model token costs (approx. 4,938 USD) are approximately 4 times larger than computing costs (approx. 810–1,268 USD)

Architecture and Configuration

  • The streaming architecture consists of CloudFront, Web Functions BFF, AgentCore Runtime V2, and Amazon Bedrock
  • The BFF handles IAM signing, session mapping, input validation, and SSE heartbeat transmission
  • Operated in the Tokyo region; the Seoul region is used as the Tokyo region is employed because V2 is not supported in Seoul

Performance and Framework Comparison

  • Both Strands Agents and Claude Agent SDK show similar cold starts of approximately 2 seconds in V2
  • Time to first token is faster for Strands Agents (0.82–2.35 seconds) than for Claude Agent SDK (2.16–5.90 seconds)
  • Claude Agent SDK experiences latency due to subprocess startup and the transmission of long system prompts

Operational and Cost Considerations

  • Shortening the idle session timeout is the most effective for cost reduction
  • It is recommended to store user IDs and conversation IDs as keys in DynamoDB to prevent session ID guessing
  • Three-tier throttling management is required for Web Functions, AgentCore Runtime, and Bedrock models

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.