AWS Certified Generative AI – Professional (AIP-C01) — Question 60
A company wants to create an annual rewards program for its customers. The rewards that customers earn vary based on different parameters such as the categories of the items ordered and the customers' purchase history.
The company needs a generative AI (GenAI) solution that uses three Amazon Bedrock agents to help customers during online catalog browsing. The agents must use knowledge bases and action groups to handle the search, recommendation, and order modules. The modules must operate sequentially. An AWS Lambda function must calculate estimated rewards for each recommended item. The solution must provide graceful degradation during service disruptions.
Which solution will meet these requirements with the MOST operational efficiency?
Answer options
- A. Define an Amazon API Gateway REST API behind each agent. Create a second Lambda function to orchestrate the calls to the agents and the rewards Lambda function. Configure the second Lambda function with a retry/fallback mechanism.
- B. Create an AWS Step Functions state machine with four tasks that run the agents and the rewards Lambda function. Set up retry and catch branches for each of the task steps.
- C. Configure each agent with a separate retry/fallback mechanism. Create a second Lambda function to orchestrate the calls to the agents and the rewards Lambda function. Define an Amazon API Gateway REST API behind the second Lambda function.
- D. Create a second Lambda function to orchestrate the calls to the agents and the rewards Lambda function. Create an AWS Step Functions state machine with one task that runs the second Lambda function. Set up retry and catch branches for the task step.
Correct answer: B
Explanation
Option B is the correct choice because it utilizes AWS Step Functions to create a structured workflow that efficiently manages the execution of all tasks, including retries and error handling, which is essential for maintaining operational continuity. The other options, while they incorporate various mechanisms, do not provide the same level of orchestration and efficiency as AWS Step Functions does, which is crucial for a seamless customer experience.