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.
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.
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
Create Secrets Manager entries for the NLQ application username and password.
If choosing the OpenAI API option, create a secret for the API key.
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.
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

