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
Hi @Sandor , did you ever manage to get this working?
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?
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
@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.
Oh damn - was hoping yall found a way around without having to use hyperdrive. Doubt my company would wanna purchase yet another product 😅
Wow, that was some times ago... 😄 I cannot even recall the context
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.
Hi everyone, I have the same issue but I find the below block and it propose an hack to do.
https://joshwright.com/uncategorized/how-to-use-cloudflare-tunnels-to-connect-to-your-rds-database-via-ec2/?unapproved=3075&moderation-hash=85e8c98f39fae1c31f7189537eac6eaf#comment-3075
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 […]