Demonstration of Natural Language Query (NLQ) of an Amazon RDS for PostgreSQL database, using SageMaker JumpStart, Amazon Bedrock, LangChain, Streamlit, and Chroma.
I've run into an error starting up the ECS Task where the Task is unable to connect to the PostgreSQL database.
After investigation, I've found that it looks to be erroring out because PostgreSQL15 defaults to forcing SSL connections for all clients (this is a new behavior for PostgreSQL15 in RDS). The code looks to be using a non-SSL connection.
I was able to fix this by creating a new parameter group that disables the requirement.
Looks like this might also be fixable by forcing SSL in the posgresql connection string (which is probably a better approach from a security perspective - still testing this).
The default rds.force_ssl parameter is set to 1 (on) for RDS for PostgreSQL version 15. All other RDS for PostgreSQL major version 14 and older have the default value for rds.force_ssl parameter set to 0 (off).
Thanks for creating this project, its been very useful!
Hello,
I've run into an error starting up the ECS Task where the Task is unable to connect to the PostgreSQL database.
After investigation, I've found that it looks to be erroring out because PostgreSQL15 defaults to forcing SSL connections for all clients (this is a new behavior for PostgreSQL15 in RDS). The code looks to be using a non-SSL connection.
I was able to fix this by creating a new parameter group that disables the requirement.
Looks like this might also be fixable by forcing SSL in the posgresql connection string (which is probably a better approach from a security perspective - still testing this).
Relevant reference from RDS documentation
Thanks for creating this project, its been very useful!