Relational Database Connectors with Workers and Cloudflared

Should it be possible to cloudflared into an instance in AWS and then have the tunnel URL point to an AWS RDS MySQL database? Been trying but just get bad gateway error messages when calling the worker.

Verified that doing the HelloWorld test is successful so wondered if this should be possible at all. The AWS instance that cloudflared is on currently utilizes the database I’m trying to connect to so I know the database can be reached from this instance. I’m just not so sure if the tunnel connection/URL can point to something not locally on that specific instance.

Thank you in advance for any help!

Hey,

Have you seen this tutorial for inspiration? https://developers.cloudflare.com/workers/tutorials/query-postgres-from-workers-using-database-connectors

Yes! Including the mysql one as well(which I’m trying to use) and unfortunately I can’t get it to work outside the docker solution pointing to the new mysql db. Just wondering if anyone else has gotten this to work outside the doctor solution and directly to an AWS RDS.

I personally haven’t.

I think you’ll find more feedback about Workers specifically on the respective Discord channel: https://blog.cloudflare.com/meet-the-workers-team-over-discord/

After some more debugging and trial an error the real error looks to be related to the following:

Since it seems the deno driver doesn’t fully support MySQL 8’s auth and I’m not sure how to implement the workaround gonna have to pass on the worker idea sadly.

How to setup a tunnel for mysql, is not written clearly, I tried pretty much times, and still failed :sob: