Cloudflare Tunnel + AWS RDS Postgres

Hi There, is there a guide, video, anything that I can follow to setup Cloudflare Tunnel and AWS RDS. What I have done so far is setup a Tunnel in a Public EC2, that works fine, and configured an entry in the tunnel public hostname, using tcp://<db-hostname>:5432 , but I kind of stuck, I cannot really access this database using postgres clients... (Also using WARP)
8 Replies
berkinovish
berkinovish11mo ago
Hi @Sandor , did you ever manage to get this working?
reinsbrain
reinsbrain8mo ago
I also want to do the same. I have a bastion EC2 with cloudflared running (healthy)... not sure what to do about networking and how i would connect to RDS (postgres) database from a worker... i dont really want to use hyperdrive because it's only ever writing to the database so i have no need for any caching because never reading also, i don't think i would need Warp although i could be wrong there... @Sandor - did you have any luck?
HeavyDistortion
HeavyDistortion2mo ago
Hi, @Sandor I’m currently in the same situation as you were. Have you found a workaround or solution for this? Sorry for tagging you guys too but just curious if maybe yall had any luck with it? @reinsbrain @berkinovish
berkinovish
berkinovish2mo ago
@HeavyDistortion Yeah, they have official support for this now: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-private-database/
Cloudflare Docs
Connect to a private database using Tunnel · Hyperdrive
Hyperdrive can securely connect to your private databases using Cloudflare Tunnel and Cloudflare Access.
HeavyDistortion
HeavyDistortion2mo ago
Oh damn - was hoping yall found a way around without having to use hyperdrive. Doubt my company would wanna purchase yet another product 😅
Sandor
SandorOP2mo ago
Wow, that was some times ago... 😄 I cannot even recall the context
HeavyDistortion
HeavyDistortion2mo ago
Ah all good - I’m trying to set up AWS RDS on Zero Trust and just wanted to use the endpoint:5432 instead of ip:5432. I spoke to support and they confirmed that this isn’t possible as of now and my only option is to get it set up with the IP. The other option is setting it up with a public hostname but that’s not something we’d want to do with our databases.
bigdoge9839
bigdoge98392w ago
Josh
Josh Wright
How to use Cloudflare Tunnels to Connect To Your RDS Database via E...
NOTE: I no longer use Cloudflare Tunnels for my RDS connection. They have great potential, but are the Cloudflare docs/tools/logging/etc need to mature before I keep them in production. I’ll leave this post up in case it helps someone else but would lean toward recommending a bastion or IP fixing service. That title puts most […]

Did you find this page helpful?