4.3. FM API Integration Patterns
💡 First Principle: The Bedrock API has specific behavioral characteristics that distinguish it from traditional REST APIs — variable response time proportional to output length, streaming capability, token-based rate limiting rather than request-based, and model-specific request schemas. Production integrations must be designed around these characteristics, not generic HTTP patterns.
Candidates who approach Bedrock integration "like any other API" fail on exam questions about streaming implementation, retry behavior, and model routing — all of which require understanding the FM-specific characteristics that differentiate Bedrock from traditional APIs.
⚠️ Common Misconception: Streaming Bedrock responses requires WebSockets. Bedrock streaming uses HTTP chunked transfer encoding (server-sent events pattern) — the connection is a standard HTTP response where the body arrives in chunks. WebSockets are needed only when the client must also send data bidirectionally during the stream.