aws-samples / aws-samples/aurora-dsql-samples
Proposal: add auth and session management sample (#1216)
- Dominant language
- TypeScript
- Stars
- 44
- Forks
- 25
- Avg merge
- 3h 4m
- Merged PRs (30d)
- 166
Description
Hi maintainers — opening this issue per CONTRIBUTING.md guidance for significant
contributions, alongside PR #1216.
## Summary
Proposing a new top-level sample app: `sample-amazon-aurora-dsql-auth-session-mgmt/`,
following the convention used by `sample-amazon-aurora-dsql-agent/`.
Node.js + TypeScript service demonstrating user authentication and session
management on Amazon Aurora DSQL, with patterns specific to DSQL's distributed
architecture.
## Patterns demonstrated
- IAM-based DB auth via `@aws/aurora-dsql-node-postgres-connector`
- Application-layer UUID generation, no foreign keys, no JSONB
- OCC retry with exponential backoff + jitter (SQLSTATE 40001)
- `CREATE INDEX ASYNC`, one-DDL-per-transaction migrations
- bcrypt password hashing, SHA-256 session token hashing
- 3,000-row transaction limit handling for bulk session revocation
## Relation to existing samples
Companion to a Builder Center blog post (forthcoming) demonstrating these
patterns end-to-end. Different from the existing `typescript/` ORM samples
in that it's a full sample app with HTTP routes, middleware, services, and
repositories — not a connector-only example.
PR: #1216
Happy to discuss the approach or folder placement before review.
Contributor guide
Research direction
Start with CONTRIBUTING.md and compare the proposed sample-amazon-aurora-dsql-auth-session-mgmt/ layout with sample-amazon-aurora-dsql-agent/ and the existing typescript/ samples. Review PR #1216 alongside the listed authentication, session, migration, retry, and bulk-revocation patterns; done means the full HTTP sample app demonstrates these DSQL-specific patterns end to end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, typescript
- Domain
- authentication, backend, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100