Domain 2: Implementation and Integration (Part 2 of 2)
This lesson covers 5 exam topics: Secure Access and Cross-Environment AI, CI/CD and GenAI Gateways, FM API Integration: Sync, Async and Streaming, Resilient FM APIs and Model Routing, Application Patterns and Developer Tools. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.
1. Secure Access and Cross-Environment AI
Central question: Who can use which model and data, and how do you serve AI where data must stay?
Secure access (skill 2.3.3)
- Identity federation between enterprise identity (IAM Identity Center, Amazon Cognito, external IdPs) and FM services.
- Role-based access control for models and data: IAM roles and policies per team or application.
- Least-privilege API access: scope
bedrock:InvokeModelto specific model ARNs; separate roles for retrieval and invocation. - Agents: AgentCore Identity works with existing identity providers (verified).
Cross-environment AI (skill 2.3.4; verified)
| Service | What it does | Use for |
|---|---|---|
| AWS Outposts | AWS infrastructure, services and APIs on customer premises, managed by AWS as part of a Region | Data that must stay on-premises; low-latency local processing |
| AWS Wavelength | AWS compute and storage at the edge of telecom (5G) networks | Ultra-low latency to mobile devices |
| Secure routing | VPN, Direct Connect, PrivateLink between cloud and on-premises | Hybrid architectures |
Exam traps
- One shared IAM role with
bedrock:*on all models. - Moving regulated data to the cloud when the rule says it must stay on-site: Outposts.
- Wavelength vs Outposts: mobile edge vs your own data centre.
2. CI/CD and GenAI Gateways
Central question: How do you ship GenAI changes safely, and give the whole company one controlled way to use models?
CI/CD for GenAI (guide examples; design guidance)
| Stage | AWS |
|---|---|
| Source | Git repository: code, prompts, guardrail configs, IaC (CloudFormation / CDK) |
| Build and test | AWS CodeBuild: unit tests, prompt regression tests, evaluation runs, security scans |
| Pipeline | AWS CodePipeline: stages with approval gates |
| Deploy | CodeDeploy or IaC; canary or blue/green |
| Rollback | Automatic when quality gates or alarms fail |
GenAI-specific gates: evaluation scores, hallucination rate, safety tests, cost per request (design guidance).
GenAI gateway (centralised abstraction layer)
A shared gateway (API Gateway + Lambda or a container service) that every team calls instead of calling models directly:
- Abstraction: one API across models and providers; swap models centrally.
- Control: authentication, quotas per team, rate limits, guardrails applied centrally.
- Observability: token usage and cost per team, logging, tracing.
- Compliance: one place to enforce data and model policies.
Exam traps
- Deploying prompt changes by hand without tests.
- Every team calling models directly with no central quotas, logging or guardrails.
- No rollback for a model or prompt update.
3. FM API Integration: Sync, Async and Streaming
Central question: Should the caller wait, queue, or watch the answer arrive?
Interaction styles (skill 2.4.1)
| Style | How | Use when |
|---|---|---|
| Synchronous | Bedrock InvokeModel / Converse from Lambda, ECS, EC2 using the AWS SDKs | Short tasks, user waiting |
| Asynchronous | Put requests on Amazon SQS; workers call the model; results stored and notified | Long tasks, spikes, no one waiting |
| Batch | Bedrock batch inference (results to S3, ~50% lower price) | Large offline jobs |
| Custom API | API Gateway with request validation in front of the model layer | External clients |
Streaming (skill 2.4.2; verified)
- ConverseStream and InvokeModelWithResponseStream return the response incrementally, so users see text appear immediately.
- Deliver to browsers with WebSockets (API Gateway WebSocket APIs) or server-sent events; the guide also names API Gateway chunked transfer encoding.
- Streaming lowers perceived latency; total generation time is similar (design guidance).
Exam traps
- Synchronous calls for 10-minute jobs behind API Gateway (integration timeouts).
- No streaming in a chat UI where users stare at a spinner.
- Forgetting the streaming IAM permission (InvokeModelWithResponseStream).
4. Resilient FM APIs and Model Routing
Central question: How do API calls survive throttling and failures, and reach the right model?
Resilience (skill 2.4.3; verified where linked)
| Technique | AWS |
|---|---|
| Exponential backoff with jitter | AWS SDK standard retry mode (default): shorter delays for transient errors, longer for throttling; a retry quota so apps fail fast |
| Adaptive retry mode | Client-side rate limiting on top of retries |
| Rate limiting | API Gateway throttling and usage plans |
| Fallbacks | Another model, Region (cross-Region inference) or a cached answer |
| Tracing across services | AWS X-Ray: request data and downstream calls to AWS services, microservices and databases |
Routing (skill 2.4.4)
| Routing | How |
|---|---|
| Static | Configuration in application code (or AppConfig) maps task type to model |
| Dynamic, content-based | Step Functions classifies the request, then routes to a specialised FM |
| Metrics-based / intelligent | Bedrock intelligent prompt routing: one endpoint routes between models in the same family by predicted response quality, with a fallback model and routing criteria (verified) |
| Gateway transforms | API Gateway request transformations select the backend |
Exam traps
- Immediate, unlimited retries on ThrottlingException.
- Routing everything to the largest model.
- No tracing, so a slow tool call is blamed on the model.
5. Application Patterns and Developer Tools
Central question: Which patterns and tools speed up building and debugging GenAI apps on AWS?
API interfaces for GenAI (2.5.1)
Handle streaming responses, token limit management (truncate or summarise inputs; cap outputs), and retry strategies for model timeouts (design guidance with guide examples).
Accessible interfaces (2.5.2)
- AWS Amplify for front-end UI components.
- OpenAPI specifications for API-first development.
- Bedrock Flows (guide: Prompt Flows) as a no-code workflow builder (verified).
Business system enhancements (2.5.3)
- Lambda for CRM enhancements (summaries, next-best-action).
- Step Functions for document-processing orchestration.
- Bedrock Data Automation for automated processing of documents, images, audio and video into structured output (verified).
Developer productivity (2.5.4)
- Amazon Q Developer generates and refactors code. Note (verified): support for Q Developer IDE plugins ends April 30, 2027; AWS points to Kiro for agentic coding, chat and MCP.
Advanced orchestration (2.5.5)
Strands Agents and AWS Agent Squad; Step Functions for agent design patterns; Bedrock for prompt chaining.
Troubleshooting efficiency (2.5.6)
- CloudWatch Logs Insights to query prompts and responses (with model invocation logging on).
- X-Ray to trace FM API calls.
- Error-pattern recognition with AI coding assistants.
Exam traps
- Recommending Q Developer IDE plugins long-term without noting the end of support.
- Searching logs by hand instead of Logs Insights queries.
- Custom document pipelines when BDA handles the modality.
References
- AIP-C01 Domain 2 — checked Oct 19, 2026
- AWS Outposts — checked Oct 19, 2026
- AWS Wavelength — checked Oct 19, 2026
- AgentCore — checked Oct 19, 2026
- AWS CodePipeline — checked Oct 19, 2026
- AWS CodeBuild — checked Oct 19, 2026
- Converse API — checked Oct 19, 2026
- Batch inference — checked Oct 19, 2026
- API Gateway WebSocket APIs — checked Oct 19, 2026
- AWS SDK retry behavior — checked Oct 19, 2026
- Intelligent prompt routing — checked Oct 19, 2026
- AWS X-Ray — checked Oct 19, 2026
- Bedrock Data Automation — checked Oct 19, 2026
- Amazon Q Developer — checked Oct 19, 2026
- Bedrock Flows — checked Oct 19, 2026
Check your understanding
Data must never leave the factory site, but you want AWS APIs?Show answerHide answer
Answer
AWS Outposts.Run prompt regression tests on every commit?Show answerHide answer
Answer
CodeBuild in a CodePipeline stage.Chat UI should show words as they're generated?Show answerHide answer
Answer
ConverseStream plus WebSockets or SSE.Default SDK retry behaviour?Show answerHide answer
Answer
Standard mode: exponential backoff with jitter and a retry quota.Query thousands of logged prompts for a failure pattern?Show answerHide answer
Answer
CloudWatch Logs Insights.