Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Connecting Compute Engine instance to AWS RDS instance

Hello,

I'm currently running into an issue attempting to connect an application running on the GCP Compute Engine to an RDS running through AWS. Each time I attempt to connect to the RDS instance I receive the error: (2003, "Can't connect to MySQL server on '<endpoint-name>' (timed out)"). The application works fine when run on a local machine and not a GCP Compute Engine instance.

I was wondering if this was something that could be resolved in order to have the two instances talk to each other properly.

 

Thank you,

Claire

Solved Solved
2 5 837
1 ACCEPTED SOLUTION

Hello @claireaw  ,Welcome on Google Cloud Community.

Did you've added firewall rule, allowing 3306 port for VPC and VM inside this VPC? 
1. Go to your Compute Engine -> Pick VM from which you want to connect with AWS RDS.
2. Search for Network interfaces and click on Network

DamianS_0-1720509543236.png

3. Then go to FIREWALLS -> Add FW rule -> For testing purposes set as on screenshot

DamianS_1-1720509608350.png

4. Wait 1-2 minutes and try to connect to your RDS.

DamianS_2-1720509878662.png

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

View solution in original post