
Explanation:
Option C is correct because it provides the most efficient and flexible solution for testing multiple foundation models across different environments:
Single AWS CDK Application: Using one CDK application with environment-specific configurations allows for consistent infrastructure across development and production environments while maintaining separation of concerns.
FoundationModel.fromFoundationModelId() Method: This method allows for dynamic selection of different foundation models at runtime, which enables product owners to easily switch between FMs for testing purposes without redeploying the application.
Single Pipeline with Multiple Stages: A single CodePipeline with separate deployment stages for each environment streamlines the deployment process and ensures consistent deployment practices across environments.
AWS CodeBuild Deploy Actions: Using CodeBuild deploy actions provides flexibility to customize deployment logic for each environment while maintaining a unified deployment workflow.
Why other options are incorrect:
Option A: Using ProvisionedModel.fromProvisionedModelArn() ties the application to specific provisioned model instances, making it harder to switch between different FMs dynamically. Multiple pipelines add unnecessary complexity.
Option B: Separate CDK applications for each environment create duplication and maintenance overhead, making it harder to keep configurations synchronized.
Option D: Manual recreation for the development environment violates DevOps best practices and creates inconsistency between environments. Using provisioned models also limits flexibility for FM switching.
This solution aligns with AWS best practices for multi-environment deployments while providing the required flexibility for FM testing.
Ultimate access to all questions.
No comments yet.
A company uses an AI assistant application to summarize the company's website content and provide information to customers. The company plans to use Amazon Bedrock to give the application access to a foundation model (FM).
The company needs to deploy the AI assistant application to a development environment and a production environment. The solution must integrate the environments with the FM. The company wants to test the effectiveness of various FMs in each environment. The solution must provide product owners with the ability to easily switch between FMs for testing purposes in each environment.
Which solution will meet these requirements?
A
Create one AWS CDK application. Create multiple pipelines in AWS CodePipeline. Configure each pipeline to have its own settings for each FM. Configure the application to invoke the Amazon Bedrock FMs by using the aws_bedrock.ProvisionedModel.fromProvisionedModelArn() method.
B
Create a separate AWS CDK application for each environment. Configure the applications to invoke the Amazon Bedrock FMs by using the aws_bedrock.FoundationModel.fromFoundationModelId() method. Create a separate pipeline in AWS CodePipeline for each environment.
C
Create one AWS CDK application. Configure the application to invoke the Amazon Bedrock FMs by using the aws_bedrock.FoundationModel.fromFoundationModelId() method. Create a pipeline in AWS CodePipeline that has a deployment stage for each environment that uses AWS CodeBuild deploy actions.
D
Create one AWS CDK application for the production environment. Configure the application to invoke the Amazon Bedrock FMs by using the aws_bedrock.ProvisionedModel.fromProvisionedModelArn() method. Create a pipeline in AWS CodePipeline. Configure the pipeline to deploy to the production environment by using an AWS CodeBuild deploy action. For the development environment, manually recreate the resources by referring to the production application code.