Implementation and integration

AIP-C01 notes, 26% of the exam, updated November 2026

This domain is 26% of scored content. It covers how you actually wire foundation models into running systems: agents, tools, deployment choices, enterprise connectivity, API patterns (sync, async, streaming), routing and developer productivity. Questions give you a workload shape (spiky traffic, legacy system, real-time chat, long document jobs) and ask which AWS building blocks to combine. The usual winners are managed services with built-in retries, scaling and observability.

Agentic AI

An agent uses a model to decide the next step, call tools, observe results and repeat until done. Key parts: the model, instructions, tools, memory and state, and stopping rules.

Option What it is Pick when
Amazon Bedrock Agents Managed agent: instructions, action groups (OpenAPI schema or function details backed by Lambda), knowledge bases, memory, guardrails, tracing You want a managed loop with minimal code
Amazon Bedrock AgentCore Managed services for running agents built with any framework: Runtime (serverless hosting), Memory, Gateway (turns APIs and Lambda into MCP tools), Identity, Observability, Code Interpreter and Browser tools You build with open frameworks and need secure, scalable production hosting
Strands Agents AWS open-source SDK for model-driven agents, tools as Python functions, multi-agent patterns, MCP support Code-first agents, any model including Bedrock
AWS Agent Squad Open-source framework (formerly Multi-Agent Orchestrator) that classifies intent and routes to specialised agents, managing conversation context Routing among several specialist agents
Step Functions You encode the loop as a state machine The sequence is known, or you need audit, retries and human approval

Memory and state. Short-term memory is the conversation history in the prompt or a session store (DynamoDB with TTL). Long-term memory is persisted facts or summaries (Bedrock Agents memory, AgentCore Memory, a vector store). State for a multi-step workflow lives in Step Functions execution state or DynamoDB.

Reasoning patterns.

  • Chain of thought asks the model to reason before answering.
  • ReAct alternates reason and act: think, call a tool, read the observation, think again. A Step Functions loop of Invoke model → Choice (tool needed?) → Invoke tool Lambda → back to model implements it explicitly.
  • Plan-and-execute: one call plans, then steps run (possibly in parallel with a Map state).
  • Multi-agent: a supervisor delegates to specialists. Bedrock supports multi-agent collaboration with a supervisor agent; Strands and Agent Squad provide it in code.

Safeguards for autonomy. Agents can loop forever or do damage, so bound them:

  • Stopping conditions: a maximum iteration count in the state machine (a counter in the Choice state) or in the framework.
  • Timeouts: Step Functions TimeoutSeconds, Lambda timeout (maximum 15 minutes), HTTP client timeouts.
  • IAM resource boundaries: each tool’s role grants only what the tool needs; the agent can’t exceed them. Use separate roles per tool.
  • Circuit breakers for failing tools and models; Guardrails on the agent; return of control or approval steps before irreversible actions.
  • Human-in-the-loop: Step Functions task tokens (.waitForTaskToken) pause until an approver responds; API Gateway collects feedback; Amazon A2I-style review queues also fit. Use it for payments, deletes, external emails and low-confidence outputs.

Model coordination. Use specialised models for different jobs (a small model to classify, a large one to reason, a vision model for images), run several in parallel and aggregate (voting, a judge model, custom merge logic), and select models with a framework that weighs cost, quality and latency.

Tool integration. A tool needs a clear name, description and JSON schema for parameters; the model chooses based on that text, so vague descriptions cause wrong calls. Implement tools in Lambda with parameter validation, error handling that returns a structured message the model can act on, idempotency for write actions, and timeouts. With the Converse API, you pass toolConfig; the model returns a toolUse block, you run the tool, and send back a toolResult block.

Model Context Protocol (MCP). An open protocol for exposing tools, resources and prompts to agents through a standard client/server interface.

MCP server hosting Fits
Lambda (stateless, short calls, via streamable HTTP and API Gateway or a Lambda adapter) Lightweight tools, spiky use, pay per call
ECS or Fargate (long-lived, stateful, heavier dependencies) Complex tools, long connections, large memory
AgentCore Gateway Convert existing APIs, OpenAPI specs and Lambda functions into MCP tools with managed auth

Use MCP client libraries in every agent so tool access is consistent, and so a tool is written once and used by Strands, Bedrock and other clients.

Model deployment strategies

Option Behaviour Pick when
Bedrock on-demand Pay per token, shared capacity, quotas apply Default; variable or unknown traffic
Bedrock Provisioned Throughput Reserved model units for hourly price, no-commitment, 1-month or 6-month terms; required to serve custom models Steady high volume, guaranteed throughput, fine-tuned models
Bedrock batch inference Asynchronous jobs from S3 to S3, discounted (about 50% less than on-demand) Offline bulk work with no latency need
SageMaker AI endpoints You choose instance type, container, scaling; real-time, async, serverless and multi-model options Models not on Bedrock, custom serving, tight infrastructure control
Lambda calling a model Serverless glue for on-demand invocation Event-driven calls to Bedrock

Hybrid is normal: Bedrock for most calls and a SageMaker endpoint for a fine-tuned or specialised model.

LLM-specific deployment concerns. Large models need GPU memory for weights plus the KV cache, which grows with context length and concurrency; throughput is measured in tokens per second, not requests; cold starts are slow because weights must load, so use specialised loading (streaming from S3, quantised weights, tensor parallelism across GPUs). SageMaker Large Model Inference (LMI) containers and other optimised servers (vLLM, TGI, TensorRT-LLM) provide continuous batching and paged attention. Size instances by model size and target concurrency, and scale on tokens or concurrency metrics, not CPU.

Optimised approaches. Use the smallest model that meets quality; use smaller pre-trained or distilled models for narrow tasks; cascade (cheap model first, escalate to a larger one when confidence is low or the task is complex); use Bedrock intelligent prompt routing to send each prompt to a cheaper or stronger model in the same family automatically.

Enterprise integration

  • Legacy systems: wrap them with API-based adapters (API Gateway, Lambda), or use events and queues (EventBridge, SQS, SNS) for loose coupling and buffering. Use data sync patterns (CDC with DMS or DynamoDB Streams, scheduled exports) when the model needs a copy of the data.
  • Existing applications: API Gateway fronts GenAI microservices, Lambda webhooks react to external systems (CRM, ticketing), EventBridge routes business events to GenAI processors. Step Functions orchestrates document workflows; Bedrock Data Automation extracts structured data from documents, images, audio and video.
  • Secure access: federate identities with IAM Identity Center or Cognito / OIDC; map groups to IAM roles; grant least-privilege bedrock:InvokeModel on specific model or profile ARNs; use RBAC for data sources (metadata filters per role, Lake Formation).
  • Cross-environment and jurisdiction: data that must stay on premises or in a country: AWS Outposts runs AWS infrastructure on site, Local Zones and Wavelength put compute near users at the edge, Direct Connect or Site-to-Site VPN with PrivateLink gives private routing. Keep processing in an approved Region and use Region-restricted inference profiles.
  • GenAI gateway: a central layer (API Gateway or an ALB with Lambda/ECS) that abstracts providers, authenticates callers, applies guardrails, rate limits and quotas per team, logs prompts and responses, tracks cost, and routes between models. It gives one place to enforce policy.
  • CI/CD for GenAI: CodePipeline and CodeBuild run unit tests, prompt regression and evaluation sets, security scans, IaC validation, then deploy prompts, guardrail versions, agents and infrastructure with rollback (CodeDeploy canary for Lambda aliases). Treat prompts, evaluation data and model configuration as versioned artifacts.

FM API integrations

Bedrock runtime APIs.

API Use
InvokeModel Native model request body; single response
InvokeModelWithResponseStream Native body; streamed chunks
Converse Unified messages, system prompts, tool use, guardrail config
ConverseStream Streaming version of Converse
StartAsyncInvoke Long-running asynchronous generation (for example video)
ApplyGuardrail Run guardrails on any text without a model call

Synchronous vs asynchronous. Synchronous suits interactive calls from Lambda, ECS or EC2. For long or bursty work, put requests in SQS, process with Lambda or workers (control concurrency to stay under quotas), and return results via polling, WebSocket or SNS. API Gateway has a 29-second default integration timeout for REST APIs (this can be raised for Regional and private REST APIs, with possible throttle-quota trade-offs), so long generations need streaming or async patterns.

Streaming. Stream tokens to reduce perceived latency. Options: Bedrock streaming API in your backend, then WebSocket (API Gateway WebSocket API, AppSync subscriptions) or server-sent events to the browser; Lambda response streaming (function URLs); REST API response streaming and chunked transfer encoding for compatible integrations. Streaming doesn’t make total time shorter or cost less.

Resilience.

  • Exponential backoff with jitter on ThrottlingException (HTTP 429); the SDK retries automatically and is configurable. ModelTimeoutException and 5xx errors are retryable; ValidationException (bad request, token limit) is not.
  • API Gateway usage plans and throttling protect the backend and limit tenants; request validators reject malformed bodies before invoking Lambda.
  • Fallbacks: another model, another Region (cross-Region inference), cached result or a degraded response.
  • AWS X-Ray traces calls across API Gateway, Lambda and downstream services; add subsegments around model calls.

Routing.

Style How
Static Application config maps a use case to a model
Content-based dynamic A Step Functions Choice state or a small classifier picks the model by task type, language, size or sensitivity
Metric-driven Route by observed latency, error rate or cost, with fallbacks when a model degrades
Gateway API Gateway request transformations map paths or headers to different backends

Application patterns and developer tools

  • API for GenAI: handle streaming, token limits (reject or truncate oversized inputs before calling, set maxTokens), retries with timeouts longer than typical generation time, and idempotency keys.
  • Accessible interfaces: AWS Amplify for front ends with declarative UI components and an AI kit; OpenAPI specs for API-first design (and to define agent action groups); Prompt Flows as a no-code builder.
  • Business enhancements: Lambda adds GenAI to a CRM (summaries, next-best action); Step Functions orchestrates document pipelines (Textract or Data Automation, then FM, then human review); Bedrock Data Automation automates extraction.
  • Developer productivity: Amazon Q Developer generates, explains and refactors code, writes tests, suggests API usage and helps diagnose errors in the IDE and console.
  • Advanced applications: Strands or Agent Squad for orchestration, Step Functions for agent patterns (parallel, map, human approval), prompt chaining (output of one prompt feeds the next).
  • Troubleshooting: CloudWatch Logs Insights queries prompts and responses from model invocation logs; X-Ray shows where latency sits; Q Developer helps interpret error patterns.

Common traps

  • API Gateway timing out on slow generations: use streaming, async, or increase the timeout where supported.
  • Putting every tool in one over-privileged role.
  • An agent with no iteration cap or timeout.
  • Choosing Provisioned Throughput for spiky or low traffic.
  • Lambda 15-minute limit for long jobs: use Step Functions, ECS or batch inference.
  • Treating ValidationException as a retryable throttle.

Exam checklist

  • Bedrock Agents vs AgentCore vs Strands vs Agent Squad vs Step Functions.
  • ReAct and chain of thought; Step Functions loops with iteration limits and task tokens for human approval.
  • MCP servers on Lambda (stateless) vs ECS (complex) vs AgentCore Gateway.
  • On-demand vs Provisioned Throughput vs batch vs SageMaker endpoints; model cascading.
  • LLM serving: GPU memory, KV cache, tokens per second, LMI containers.
  • Gateway pattern for central auth, rate limits, logging and routing.
  • Outposts, Wavelength, PrivateLink and Direct Connect for jurisdiction and hybrid cases.
  • Converse vs InvokeModel; streaming options; SQS for async; backoff on 429.
  • X-Ray and Logs Insights for troubleshooting; Q Developer for development tasks.

Test what you just read. 26 practice questions on implementation and integration.

Practise this domain

All AIP-C01 notes