Can't connect database software to AWS RDS

Viewed 36

After spending hours trying to debug this problem, I've come out empty-handed.

I'm new to AWS, so it's possible I might be missing something here, but it seems I've exhausted all possibilities based on what I've read online.

So the idea is, I want to create a RDS instance. I'm new to cloud computing as a whole, but how I understand it, this instance is essentially the storage of my relational database on the cloud. Then I connect the DBMS of my liking to it on my local machine. I tried with both Postgresql and MySQL, but both ran into the same issue. Note, when I say I used the two aforementioned DB engines, I made sure that in each case, I set them as the engine when creating the RDS instance. I then configured the security group accordingly.

What I've done:

  • I've created an admin user as per the aws docs.
  • I created a security group in the VPC that has the following inbound rule (In this case, I intend to create a RDS instance with MySQL as the engine): Inbound rules for security group
  • I created an RDS instance with MySQL as the engine, made sure it had public accessibility, and made sure the security group of the VPC was the one I created.

I then tried connecting to the database via both MySQL Workbench and pgAdmin, but both ran into the same issue. I tried using my IP as the source for the security group inbound rule – that didn't work. I then set the source to 0.0.0.0/0, which I understand is all sources; that also unfortunately didn't work.

Any ideas what else I could be doing wrong here? Thanks.

1 Answers

Well, seems I managed to figure it out, albeit indirectly.

I gave up working with AWS and decided to try MongoDB. When connecting to MongoDB Atlas, once again, I couldn't connect. I read up the troubleshooting page in the docs and saw that they recommend you use an outgoing port tester to check if you can reach them from the port they use (27017 in their case). I tested it and found that it wasn't working. I checked to see if it had to do with my firewall (I'm on mac); I disabled it but it didn't do anything. I disabled my VPN (ProtonVPN) and it turned out that it was what was causing the issue. But that's not all there is to it. Although the outgoing port test was working, I still couldn't successfully connect to the DB. So I went to configure the inbound IP address rules so that it would accept from any source, and that was the final fix needed.

Related