Search⌘ K
AI Features

Building Serverless GenAI Application with Amazon Bedrock

Takes 90 mins

Amazon Bedrock enables developers to integrate powerful Generative AI models without the complexity of model training, infrastructure management, or scaling. With the introduction of Amazon Bedrock AgentCore, developers now have a highly modular framework to orchestrate AI agents, manage secure data gateways, and route queries seamlessly. By leveraging Bedrock and AgentCore together, you can build intelligent, multi-step applications that process and respond to user queries efficiently.

In this Cloud Lab, you’ll begin by setting up an Amazon Bedrock Managed Knowledge Base. This fully managed service handles data ingestion, embedding generation, and vector storage automatically, eliminating the need to manually configure and manage external vector databases. Next, you’ll configure Amazon Bedrock Guardrails to ensure responsible AI output filtering. Finally, you will build and deploy your AI agent using Amazon Bedrock AgentCore. By integrating the managed knowledge base and guardrails natively via the AgentCore Gateway, your agent will securely orchestrate multi-step retrieval and process user queries using Anthropic's Claude model.


Once your data and models are in place, you’ll create a Lambda function to interact with your Bedrock AgentCore deployment. When a user query is made, the Lambda function will invoke the agent, which automatically retrieves the relevant context from your managed knowledge base. You will configure an API Gateway to trigger this Lambda function, passing the query and returning the processed response. Finally, you’ll integrate the API with a React web application hosted on AWS Amplify, establishing a seamless connection between the frontend and backend services to enable a full AI-powered question-answering experience.


After completing this Cloud Lab, you’ll have the skills to leverage Amazon Bedrock for creating and managing knowledge bases, and deploying modern AI agents using Bedrock AgentCore. You will also gain experience integrating these resources with AWS services like Lambda and API Gateway, and deploying a React web application on AWS Amplify to build a complete serverless GenAI application.

The following is the high-level architecture diagram of the infrastructure you’ll create in this Cloud Lab:

End-to-end GenAI serverless application with Amazon Bedrock
End-to-end GenAI serverless application with Amazon Bedrock