0

I am running into an issue connect my AWS RDS to build my application. I have dont 15 different iterations with assistant but I am still getting the same error of failing to connect to the AWS database.

~/cosmos-backend$ python main.py
Testing database connection...
Host: cosmos-db.c4s4aoalsnz3.us-east-1.rds.amazonaws.com
Database: COSMOS-db
Port: 5432
Setting up SSH tunnel...
Tunnel config (excluding credentials): {'ssh_address_or_host': ('ssh.us.replit.com', 22), 'ssh_username': 'ScottSosso', 'remote_bind_address': ('cosmos-db.c4s4aoalsnz3.us-east-1.rds.amazonaws.com', 5432), 'local_bind_address': ('127.0.0.1', 6543), 'allow_agent': False}
Unexpected error: No password or public key available!
Failed to connect to database.
~/cosmos-backend$ 

I have the password setup in the secret key but it is still not connecting. Addtionally this is stemming from an issue where I had to create specific rules in AWS secruity groups

This error occurs in AWS when setting up the security group rule because you need to specify the CIDR notation correctly. When adding the Replit SSH server IPs, you need to append "/32" to indicate it's a single IP address in CIDR notation.

In AWS RDS security group, set up the inbound rules like this:

First rule:
Type: Custom TCP
Port Range: 5432
Source: Custom
CIDR: 35.165.38.90/32
Second rule:
Type: Custom TCP
Port Range: 5432
Source: Custom
CIDR: 34.122.157.26/32

Any insights ?

I outlined the items above on what I tried and my output

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.