Question 1 · choose 1
A company runs a summarization service on AWS Lambda that calls Amazon Bedrock through the Converse API. The team wants to move traffic to a newer model, and later possibly to another provider's model, without deploying new function code or a new function version. The switch must roll out to a percentage of invocations at a time, must be checked against a schema before it takes effect, and must roll back automatically if an error alarm fires. Which solution meets these requirements?
- AReplace the Converse API with InvokeModel calls so that each provider's native request body can be built in code
- BKeep the model ID and settings in AWS AppConfig with a validator and a gradual deployment strategy, read through its Lambda extension
- CKeep the model ID in a Lambda environment variable and update the variable when the team wants to switch models
- DStore the model ID in an AWS Systems Manager Parameter Store parameter that the function reads at the start of every invocation
Show the answer and why
AReplace the Converse API with InvokeModel calls so that each provider's native request body can be built in code
Incorrect
Provider-specific request bodies make switching harder and need code changes. The Converse API is what lets the same code work across models that support messages.
BKeep the model ID and settings in AWS AppConfig with a validator and a gradual deployment strategy, read through its Lambda extension
Correct
AppConfig changes application behavior without redeploying code, validates configuration before deployment, rolls changes out gradually with a deployment strategy, and rolls back automatically when a monitored CloudWatch alarm fires.
CKeep the model ID in a Lambda environment variable and update the variable when the team wants to switch models
Incorrect
Changing an environment variable updates the function configuration for every invocation at once. There is no schema validation, percentage rollout or alarm-based rollback.
DStore the model ID in an AWS Systems Manager Parameter Store parameter that the function reads at the start of every invocation
Incorrect
Parameter Store holds the value, but a parameter update applies to every reader immediately, with no deployment strategy, validator or automatic rollback.
Two things make model switching code-free: a model-agnostic API (Converse) and an external, governed configuration source. AppConfig adds what plain parameters lack: validators, gradual deployment strategies and automatic rollback on CloudWatch alarms.
AWS documentation