The best way to control Claude Code, Codex and more from any computer or phone

main
md 33 lines 979 Bytes
Rendered Raw
1 # Hyperdrive + Workers VPC + Aurora
2
3 [Guide](https://alchemy.run/cloudflare/data/hyperdrive-private-database/)
4
5 A Cloudflare Worker queries Aurora PostgreSQL in private AWS subnets through Hyperdrive. Nothing in the VPC accepts inbound traffic: `cloudflared` runs on ECS Fargate and dials out to Cloudflare.
6
7 ```
8 Worker → Hyperdrive → VPC Service → Tunnel → cloudflared (ECS) → Aurora
9 ```
10
11 - [src/Database.ts](./src/Database.ts) — VPC, security groups, Aurora
12 - [src/Connector.ts](./src/Connector.ts) — Cloudflare Tunnel + `cloudflared` on ECS
13 - [src/Hyperdrive.ts](./src/Hyperdrive.ts) — TCP VPC Service + Hyperdrive
14 - [src/worker.ts](./src/worker.ts) — the Worker
15
16 ## Deploy
17
18 From the repository root:
19
20 ```sh
21 pnpm install
22 cd examples/cloudflare-hyperdrive-aws-vpc
23 pnpm run deploy --profile testing --stage hyperdrive-vpc
24 curl "<url>"
25 ```
26
27 Aurora incurs charges until destroyed.
28
29 ## Destroy
30
31 ```sh
32 pnpm run destroy --profile testing --stage hyperdrive-vpc
33 ```