t3-code-android-nightly/.repos/alchemy-effect/examples/aws-dsql-drizzle
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00
..
src chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
test chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
alchemy.run.ts chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
health-event.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
package.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
README.md chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
tsconfig.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00

Drizzle + Aurora DSQL + Lambda

Integration guide · AWS setup

Deploy

From the repository root:

pnpm install
cd examples/aws-dsql-drizzle
pnpm deploy --profile testing

Use a DSQL region such as us-west-2. Deployment needs dsql:DbConnectAdmin and network access to port 5432; these resources incur AWS charges.

Query

aws lambda invoke --region us-west-2 \
  --function-name '<functionName>' \
  --cli-binary-format raw-in-base64-out \
  --payload file://health-event.json response.json
cat response.json

Use the printed function name. Signed HTTP CRUD examples.

Schema and connections

Cluster · Deployment-only bootstrap · Non-admin connection and verified TLS

Initial setup creates app.todos and app_user. Later schema changes need versioned, DSQL-compatible migrations.

Live test

ALCHEMY_PROFILE=testing bun test test/integ.test.ts

Destroy

pnpm destroy --profile testing
aws dsql get-cluster --region us-west-2 --identifier '<clusterId>'

Destroy deletes the database data. Deletion is asynchronous; wait for DELETED or ResourceNotFoundException.