You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/agents_ux/video_games_sales_assistant_with_amazon_bedrock_agents/README.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
> [!IMPORTANT]
9
9
> **🚀 Ready-to-Deploy Agent Web Application**: Use this reference solution to build other agent-powered web applications across different industries. Extend the agent capabilities by adding custom tools for specific industry workflows and adapt it to various business domains.
10
10
11
-
This solution provides a Generative AI application reference that allows users to interact with data through a natural language interface. The solution connects**[Amazon Bedrock Agents](https://aws.amazon.com/bedrock/agents/)** to a PostgreSQL database, providing data analysis capabilities through a Web Application interface.
11
+
This solution provides a Generative AI application reference that allows users to interact with data through a natural language interface. The solution uses**[Amazon Bedrock Agents](https://aws.amazon.com/bedrock/agents/)**connected to a PostgreSQL database for data analysis capabilities, deployed with **[AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/home.html)** for back-end infrastructure and **[AWS Amplify](https://docs.amplify.aws/)** for the front-end web application.
12
12
13
13
<divalign="center">
14
14
<imgsrc="./images/data-analyst-assistant-amazon-bedrock-agents.gif"alt="Conversational Data Analyst Assistant Solution with Amazon Bedrock Agents">
@@ -39,24 +39,28 @@ The following architecture diagram illustrates a reference solution for a genera
39
39
40
40
> [!IMPORTANT]
41
41
> This sample application is meant for demo purposes and is not production ready. Please make sure to validate the code with your organizations security best practices.
42
-
>
43
-
> Cost Alert: This solution will cost approximately $180 USD per month, mainly for Aurora Serverless and RDS Proxy, plus the usage of on-demand services like Amazon Bedrock and Lambda functions. Please ensure you understand these costs before deployment.
44
42
45
-
The solution deploys the following AWS services:
43
+
### CDK Infrastructure Deployment
44
+
45
+
The AWS CDK stack deploys and configures the following managed services:
46
46
47
-
-**Amazon Bedrock Agent**: Powers the ***Data Analyst Assistant*** that answers questions by generating SQL queries using Claude 3.5 Haiku
47
+
-**Amazon Bedrock Agent**: Powers the ***Data Analyst Assistant*** that answers questions by generating SQL queries using Claude Haiku 4.5
48
48
-**AWS Lambda**: Processes agent requests through various tools including:
49
-
- /runSQLQuery: Executes queries against the database
49
+
- /runSQLQuery: Executes queries against the database via the RDS Data API
50
50
- /getCurrentDate: Retrieves the current date
51
51
- /getTablesInformation: Provides database tables information for agent context
52
-
-**Aurora Serverless PostgreSQL**: Stores the video game sales data
52
+
-**Amazon Aurora Serverless v2 PostgreSQL**: Stores the video game sales data with RDS Data API integration
53
53
-**Amazon DynamoDB**: Tracks questions and query results
-**Amazon VPC**: Provides network isolation for the database with public and private subnets
56
+
-**Amazon S3**: Import bucket for loading data into Aurora PostgreSQL
57
+
58
+
### Amplify Deployment for the Front-End Application
59
+
56
60
-**React Web Application**: Delivers the user interface for the assistant
57
61
- Uses Amazon Cognito for user authentication and permissions management
58
62
- The application invokes the Amazon Bedrock Agent for interacting with the assistant
59
-
- For chart generation, the application directly invokes the Claude 3.7 Sonnet model
63
+
- For chart generation, the application directly invokes the Claude Haiku 4.5 model
60
64
61
65
> [!NOTE]
62
66
> The React Web Application uses Amazon Cognito for user authentication and permissions management, providing secure access to Amazon Bedrock and Amazon DynamoDB services through authenticated user roles.
@@ -70,17 +74,17 @@ The solution deploys the following AWS services:
70
74
The **user interaction workflow** operates as follows:
71
75
72
76
- The web application sends user business questions to the Amazon Bedrock Agent
73
-
- The agent (powered by Claude 3.5 Haiku) processes natural language and determines when to execute database queries
74
-
- Lambda functions execute SQL queries against the Aurora PostgreSQL database and send the results back to the agent, which formulates an answer to the question
77
+
- The agent (powered by Claude Haiku 4.5) processes natural language and determines when to execute database queries
78
+
- Lambda functions execute SQL queries against the Aurora PostgreSQL database via the RDS Data API and send the results back to the agent, which formulates an answer to the question
75
79
- After the agent's response is received by the web application, the raw data query results are retrieved from the DynamoDB table to display both the answer and the corresponding records
76
-
- For chart generation, the application invokes a model (powered by Claude 3.7 Sonnet) to analyze the agent's answer and raw data query results to generate the necessary data to render an appropriate chart visualization
80
+
- For chart generation, the application invokes a model (powered by Claude Haiku 4.5) to analyze the agent's answer and raw data query results to generate the necessary data to render an appropriate chart visualization
77
81
78
82
## Deployment Instructions
79
83
80
84
The deployment consists of two main steps:
81
85
82
-
1.**Generative AI Application** - [Data Source and Amazon Bedrock Agent Deployment with AWS SAM](./sam-bedrock-video-games-sales-assistant/)
83
-
2.**Front-End Implementation** - [Integrating Amazon Bedrock Agent with a Ready-to-Use Data Analyst Assistant Application](./amplify-video-games-sales-assistant-bedrock-agent/)
86
+
1.**Generative AI Application** - [Data Source and Amazon Bedrock Agent Deployment with AWS CDK](./cdk-video-games-sales-assistant-bedrock-agent/)
87
+
2.**Front-End Implementation** - [Deploying a Conversational Data Analyst Assistant Solution with Amazon Bedrock Agents](./amplify-video-games-sales-assistant-bedrock-agent/)
84
88
85
89
> [!NOTE]
86
90
> *It is recommended to use the Oregon (us-west-2) or N. Virginia (us-east-1) regions to deploy the application.*
@@ -118,4 +122,4 @@ The following images showcase a conversational experience analysis that includes
118
122
119
123
## License
120
124
121
-
This project is licensed under the Apache-2.0 License.
125
+
This project is licensed under the Apache-2.0 License.
Copy file name to clipboardExpand all lines: examples/agents_ux/video_games_sales_assistant_with_amazon_bedrock_agents/amplify-video-games-sales-assistant-bedrock-agent/README.md
+70-23Lines changed: 70 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,21 @@
1
1
# Front-End Implementation - Integrating Amazon Bedrock Agent with a Ready-to-Use Data Analyst Assistant Application
2
2
3
-
This tutorial guides you through setting up a React Web application that integrates with your Amazon Bedrock Agent, creating a Data Analyst Assistant for Video Game Sales.
3
+
This tutorial guides you through setting up a React Web application using **[AWS Amplify](https://docs.amplify.aws/)** that integrates with your **[Amazon Bedrock Agent](https://aws.amazon.com/bedrock/agents/)** deployment, creating a Data Analyst Assistant for Video Game Sales.
4
+
5
+
> [!NOTE]
6
+
> **Working Directory**: Make sure you are in the `amplify-video-games-sales-assistant-bedrock-agent/` folder before starting this tutorial. All commands in this guide should be executed from this directory.
4
7
5
8
## Overview
6
9
7
-
By the end of this tutorial, you'll have a fully functional Generative AI web application that allows users to interact with a Data Analyst Assistant interface.
10
+
By the end of this tutorial, you'll have a fully functional Generative AI web application that allows users to interact with a Data Analyst Assistant interface powered by Amazon Bedrock Agents.
8
11
9
12
The application consists of two main components:
10
13
11
14
-**React Web Application**: Provides the user interface and handles user interactions
12
15
-**Amazon Bedrock Integration:**:
13
16
- Uses your Bedrock Agent for data analysis and natural language processing
14
17
- The application invokes the Amazon Bedrock Agent for interacting with the assistant
15
-
- Directly invokes Claude 3.7 Sonnet model for chart generation and visualization
18
+
- Directly invokes Claude Haiku 4.5 model for chart generation and visualization
16
19
17
20
> [!IMPORTANT]
18
21
> This sample application is for demonstration purposes only and is not production-ready. Please validate the code against your organization's security best practices.
@@ -22,10 +25,6 @@ The application consists of two main components:
22
25
Before you begin, ensure you have:
23
26
24
27
-[Node.js version 18+](https://nodejs.org/en/download/package-manager)
25
-
- React Scripts installed:
26
-
```bash
27
-
npm install react-scripts
28
-
```
29
28
30
29
## Set Up the Front-End Application
31
30
@@ -39,7 +38,7 @@ npm install
39
38
40
39
### Install Amplify CLI
41
40
42
-
Install the Amplify CLI globally:
41
+
Install the **[AWS Amplify](https://docs.amplify.aws/)** CLI globally:
43
42
44
43
```bash
45
44
npm install -g @aws-amplify/cli
@@ -53,6 +52,9 @@ Initialize the Amplify project:
53
52
amplify init
54
53
```
55
54
55
+
- Do you want to continue with Amplify Gen 1? **`yes`**
56
+
- Why would you like to use Amplify Gen 1? **`Prefer not to answer`**
57
+
56
58
Use the following configuration:
57
59
58
60
- ? Enter a name for the project: **`daabedrockagent`**
@@ -98,12 +100,51 @@ amplify push
98
100
> [!NOTE]
99
101
> This creates a Cognito User Pool and Identity Pool in your AWS account for user authentication. AWS credentials for the Front-End Application are automatically managed through Cognito.
100
102
103
+
## Get CDK Output Values
104
+
105
+
Get the required values from your CDK project outputs. These values are needed for configuring AuthRole permissions and environment variables:
Copy file name to clipboardExpand all lines: examples/agents_ux/video_games_sales_assistant_with_amazon_bedrock_agents/amplify-video-games-sales-assistant-bedrock-agent/src/sample.env.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ const WELCOME_MESSAGE = "I'm your Video Games Sales Data Analyst, crunching data
0 commit comments