AWS Certified Generative AI – Professional (AIP-C01) — Question 53
A company is implementing a serverless inference API by using AWS Lambda. The API will dynamically invoke multiple AI models hosted on Amazon Bedrock. The company needs to design a solution that can switch between model providers without modifying or redeploying Lambda code in real time. The design must include safe rollout of configuration changes and validation and rollback capabilities.
Which solution will meet these requirements?
Answer options
- A. Store the active model provider in AWS Systems Manager Parameter Store. Configure a Lambda function to read the parameter at runtime to determine which model to invoke.
- B. Store the active model provider in AWS AppConfig. Configure a Lambda function to read the configuration at runtime to determine which model to invoke.
- C. Configure an Amazon API Gateway REST API to route requests to separate Lambda functions. Hardcode each Lambda function to a specific model provider. Switch the integration target manually.
- D. Store the active model provider in a JSON file hosted on Amazon S3. Use AWS AppConfig to reference the S3 file as a hosted configuration source. Configure a Lambda function to read the file through AppConfig at runtime to determine which model to invoke.
Correct answer: B
Explanation
Option B is correct because AWS AppConfig allows for dynamic configuration management, enabling real-time changes without modifying the Lambda code. Option A is less ideal as AWS Systems Manager Parameter Store lacks built-in support for safe rollout and rollback. Option C is incorrect since hardcoding model providers in separate Lambda functions does not allow for dynamic switching. Option D introduces unnecessary complexity by using S3, which is not as efficient as directly using AppConfig for real-time configuration management.