Skip to content

AIP-C01 · Study Guide

← Domain 1: Foundation Model Integration, Data Management, and Compliance

1.2.2 · Lesson 5 of 28

Dynamic model selection and provider switching

Build an abstraction layer so application code does not depend directly on one FM.

WHAT

Build an abstraction layer so application code does not depend directly on one FM.

WHY

This enables:

  • model switching
  • provider switching
  • A/B testing
  • cost optimization
  • fallback
  • gradual migration

HOW

Use a model router:

Application
    ↓
Model Abstraction / Router
    ├── Model A
    ├── Model B
    └── Model C

Configuration controls the selected model:

AppConfig
   ↓
Model Routing Configuration
   ↓
Lambda / Application
   ↓
Bedrock / Provider

AWS services

  • AWS Lambda
  • Amazon API Gateway
  • AWS AppConfig
  • Amazon Bedrock

WHEN TO USE

Use when model choice may change without application-code changes.

EXAM TRAP

Do not hard-code model-specific logic throughout the application if dynamic switching is a requirement.

---

Key points

  • model switching
  • provider switching
  • A/B testing
  • cost optimization
  • gradual migration
  • Use when model choice may change without application-code changes.

Exam focus

Do not hard-code model-specific logic throughout the application if dynamic switching is a requirement.

View progress