Subdomain 1.2: Select and configure FMs.
1.A media company invokes Amazon Bedrock foundation models directly from its application backend using hardcoded model IDs. Leadership now wants the ability to swap between Bedrock model providers, or roll out a new model version to a subset of traffic, without redeploying application code. Which architecture best achieves this?
- A.Put an AWS Lambda function behind Amazon API Gateway to abstract the invocation, and source the active model ID from AWS AppConfig so it can change without a code deploy.
- B.Keep the current hardcoded model IDs in the application, and rely on manual code reviews to catch any place that needs to change when a model swap is requested.
- C.Move the model IDs into environment variables set at container build time, and redeploy the application container whenever a different model needs to be used.
- D.Store the model ID inside a configuration file bundled into the deployment package, and cut and ship a brand-new application release each time that file needs any change.
Show answer & explanation
Correct answer: A — Put an AWS Lambda function behind Amazon API Gateway to abstract the invocation, and source the active model ID from AWS AppConfig so it can change without a code deploy.
- A. Fronting the invocation logic with Lambda and API Gateway, and externalizing the model choice to AppConfig, lets the routing and model ID change through a configuration deployment rather than an application code deploy.
- B. Relying on manual review to catch every hardcoded reference does not remove the underlying coupling and leaves the process error-prone and still tied to a code change.
- C. Environment variables set at build time still require rebuilding and redeploying the container image for every model change, which is the exact friction the team wants removed.
- D. Bundling the model ID inside the deployment package still requires cutting and shipping a new release for every change, so it does not decouple configuration from code deploys.