Skip to content

Proposal: add auth and session management sample (#1216) #1217

@charycha

Description

@charycha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions