AIP-C01 practice question 10 of 15

A company developed a multimodal content analysis application by using Amazon Bedrock. The application routes different content types (text, images…

Full set: 127 questions
A company developed a multimodal content analysis application by using Amazon Bedrock. The application routes different content types (text, images, and code) to specialized foundation models (FMs). The application needs to handle multiple types of routing decisions. Simple routing based on file extension must have minimal latency. Complex routing based on content semantics requires analysis before FM selection. The application must provide detailed history and support fallback options when primary FMs fail. Which solution will meet these requirements?
Answer options
A: Configure AWS Lambda functions that call Amazon Bedrock FMs for all routing logic. Use conditional statements to determine the appropriate FM based on content type and semantics.
B: Create a hybrid solution. Handle simple routing based on file extensions in application code. Handle complex content-based routing by using an AWS Step Functions state machine with JSONata for content analysis and the InvokeModel API for specialized FMs. Correct answer
C: Deploy separate AWS Step Functions workflows for each content type with routing logic in AWS Lambda functions. Use Amazon EventBridge to coordinate between workflows when fallback to alternate FMs is required.
D: Use Amazon SQS with different SQS queues for each content type. Configure AWS Lambda consumers that analyze content and invoke appropriate FMs based on message attributes by using Amazon Bedrock with an AWS SDK.
Correct Answer:
B. Create a hybrid solution. Handle simple routing based on file extensions in application code. Handle complex content-based routing by using an AWS Step Functions state machine with JSONata for content analysis and the InvokeModel API for specialized FMs.
Explanation

This scenario requires a solution that efficiently handles two distinct routing paths: a low-latency path for simple decisions and an orchestrated path for complex ones. A hybrid approach is optimal. Simple routing based on file extensions can be handled directly in the application code for minimal latency. For complex semantic analysis and routing, AWS Step Functions is the ideal service. It provides a visual workflow to orchestrate multiple steps, maintains a detailed execution history for auditing, and has built-in error handling (e.g., Catch fields) to implement fallback logic when a primary model fails. This separation of concerns meets all requirements effectively.

Why Incorrect

A. A single Lambda function for all logic would introduce unnecessary latency for simple requests and makes implementing robust, stateful fallbacks and history tracking more complex than using a dedicated orchestration service.
C. Using separate Step Functions workflows coordinated by EventBridge is overly complex. A single state machine can handle conditional logic and fallbacks internally, reducing architectural complexity and potential points of failure.
D. Amazon SQS is a queuing service, not an orchestration engine. While it decouples components, it does not provide the state management, detailed history, or built-in error handling needed for the complex routing workflow.

References

1. AWS Step Functions Developer Guide. (2024). What is AWS Step Functions? "AWS Step Functions is a visual workflow service that helps developers use AWS services to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning (ML) pipelines."

2. AWS Step Functions Developer Guide. (2024). Error handling in Step Functions. "Step Functions state machines can be configured to handle errors... A state can have a field named Catch, whose value must be an array of objects that are known as catchers."

3. AWS Step Functions Developer Guide. (2024). Execution history. "Step Functions provides visibility into each execution's history. You can review the detailed information... in the Step Functions console."

Scroll to Top