1

I am developing an application to learn AWS. I am using react and nodejs as a backend. I created AWS RDS Postgresql database and able to connect to it using pgadmin, and nodejs on a local host( I assume it is connected bc pgAdmin shows 2 connections when localhost port is running). Using pgAdmin I am able to create tables and put data into the tables using SQL queries.

However, I am NOT able to make Post or Get requests from the database using react and/or nodejs with proxy and without proxy. It seems that it does not allow it to bc of security issues? I also set the security group to public and All Access.

Is it possible to make a Post request and a Get request to the database from localhost with proxy or without? So far it either gives me 404 Not Found or ERR_Connection Refused.

If not, then how one develops an application using AWS RDS on one's own computer?

0

1 Answer 1

1

I had similar issues using mySQL. This solved my issue. By default AWS does not allow other services outside it's VPC connect to db instances. to enable remote access,

  • Go to your RDS tab and click on the db instance
  • Under security, click on Vpc security group (click on the one with active beneath it)
  • You should be on another page now. The security group should be selected by default.
  • Click on the Actions dropdown menu and click on Edit Inbound rules
  • Add a new rule. type should be All traffic, source should be custom, then you can enter the IP address of your local machine. you can select anywhere if you're not sure what you IP is or if your IP is not static.
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much. I did change the Inbound rules but apparently, I did something wrong there. Now, I followed your instructions and it all worked. Thank you!

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.