AWS RDS Database instance not wanting to connect to GCP Compute Engine instance

0

Hello,

I am attempting to run a program on a GCP Compute Engine instance that connects to an AWS RDS database.

Each time I try to connect from the GCP instance, I receive the error: (2003, "Can't connect to MySQL server on '<endpoint-name>' (timed out)")

The application works fine when run in IDE, and I'm able to connect to the RDS through external programs, but it refuses to connect properly through the VM.

Is there something I've missed, maybe with the security, that would allow the two to communicate?

Thank you,

Claire

asked 8 days ago107 views
1 Answer
1

Hello.

Because of the timeout error, I thought that the GCP Compute Engine IP address might not be allowed in the inbound rules of the security group on the RDS side.
What kind of rules are set for RDS security group settings?
Also, does RDS have public access enabled?
https://repost.aws/knowledge-center/rds-connectivity-instance-subnet-vpc

If you want to access privately, I think you need to connect AWS and GCP with a VPN etc.
https://cloud.google.com/network-connectivity/docs/vpn/tutorials/create-ha-vpn-connections-google-cloud-aws

profile picture
EXPERT
answered 8 days ago
profile picture
EXPERT
reviewed 7 days ago
  • Hello,

    Thank you for the help, I'm very new at all of this.

    I was messing with the inbound security rules for the RDS, and I managed to get it to work. I added an inbound rule for "All TCP", and "0.0.0.0". However, this doesn't seem to me like it's extraordinarily safe.

    Though this is mostly a side project, it does have a public-facing front, so I'm going to make sure there's no potential vulnerabilities with the security rules.

    -Claire

  • I added an inbound rule for "All TCP", and "0.0.0.0". However, this doesn't seem to me like it's extraordinarily safe.

    As you know, this setting is not secure. If possible, configure MySQL's 3306 and IP addresses to only allow those from GCP Compute Engine.