OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Data & Analytics

Guidance For Natural Language Queries Of Relational Databases On Aws

A Python web demonstration that lets users ask natural-language questions of an Amazon RDS for PostgreSQL database and returns a natural-language answer, the associated SQL query, and a Pandas-compatible result set. It runs on Amazon ECS with AWS Fargate and offers foundation-model options through SageMaker JumpStart, Amazon Bedrock, or the OpenAI API.

Independent OpenViST project profile, based on linked sources.

Guidance For Natural Language Queries Of Relational Databases On Aws — OpenViST project profile in AI Data & Analytics.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it to prototype conversational querying over PostgreSQL or explore how model and prompt choices affect answers. It requires AWS infrastructure setup rather than only opening a ready-made hosted chat page.

Who it is for

  • Developers prototyping natural-language access to PostgreSQL data.
  • AWS practitioners exploring foundation-model choices for text-to-SQL applications.
  • Teams that want to inspect generated SQL alongside conversational answers.

Documented uses

  • Ask questions about relational data in natural language.
  • Review the SQL associated with a generated answer.
  • Explore model-dependent NLQ behavior using a sample PostgreSQL dataset.
Before you choose

Requirements & limits

The repository is public and identifies its license as MIT-0.

  • The three model routes are SageMaker JumpStart, Amazon Bedrock, and the OpenAI API.
  • NLQ accuracy depends on model capability, prompt design, labeled examples, and database schema naming.
  • The documented setup uses AWS Secrets Manager and CloudFormation, and the ECS service-linked role must exist before the main stack deployment.
  • The README describes the application’s database access as read-only.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Prepare AWS credentials and the main stack

Set up the documented AWS secrets and deploy the main NLQ infrastructure stack.

Before you start

  • An AWS account and AWS CLI for the documented Secrets Manager and CloudFormation steps.
  • Database username and password values for the application.
  • An OpenAI API key if using the OpenAI model option.
  • An existing AWSServiceRoleForECS service-linked role before deploying the main stack.

Steps

  1. Create Secrets Manager entries for the NLQ application username and password.

  2. If choosing the OpenAI API option, create a secret for the API key.

  3. From the cloudformation directory, deploy NlqMainStack.yaml with the documented CloudFormation command and current public IP address parameter.

Expected outcome

The documented preparation and deployment stages create the main stack, including networking, security, an RDS instance, and an ECR repository.

Guide limitations

  • This covers the main-stack setup stages only; the README continues with further application image and deployment steps.
  • Access to the load balancer and RDS is restricted to the configured current IP address, which must be updated if it changes.
  • The SageMaker JumpStart route may require a suitable inference instance or service-quota approval.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
aws-solutions-library-samples/guidance-for-natural-language-queries-of-relational-databases-on-aws · Official homepage title · retained in its source language