Skip to content

Update samples to use DSQL connectors#221

Merged
amaksimo merged 1 commit intomainfrom
use-dsql-connectors
Dec 20, 2025
Merged

Update samples to use DSQL connectors#221
amaksimo merged 1 commit intomainfrom
use-dsql-connectors

Conversation

@amaksimo
Copy link
Copy Markdown
Contributor

Updates Python and JavaScript driver samples to use the official DSQL connectors instead of manual SDK token generation.

Changes

Python

  • psycopg: Use aurora-dsql-python-connector with aurora_dsql_psycopg
  • psycopg2: Use aurora-dsql-python-connector with aurora_dsql_psycopg2

JavaScript

  • node-postgres: Use @aws/aurora-dsql-node-postgres-connector
  • postgres-js: Use @aws/aurora-dsql-postgresjs-connector

Documentation

  • Updated READMEs to reference connector documentation
  • Removed references to manual boto3/SDK token generation

Testing

All samples tested against live DSQL cluster.

@amaksimo amaksimo force-pushed the use-dsql-connectors branch 3 times, most recently from fb8bf5f to 524b775 Compare December 20, 2025 00:53
Comment thread javascript/node-postgres/src/index.js Outdated
Comment thread javascript/node-postgres/README.md Outdated
Comment thread javascript/node-postgres/src/index.js Outdated
Comment thread python/psycopg/src/example.py Outdated
@amaksimo amaksimo force-pushed the use-dsql-connectors branch from 524b775 to d4a814b Compare December 20, 2025 01:05
@amaksimo amaksimo marked this pull request as draft December 20, 2025 01:07
- Python psycopg/psycopg2: Use aurora-dsql-python-connector
- JavaScript node-postgres: Use @aws/aurora-dsql-node-postgres-connector
- JavaScript postgres-js: Use @aws/aurora-dsql-postgresjs-connector
- Update READMEs to reference connector documentation
@amaksimo amaksimo force-pushed the use-dsql-connectors branch from d4a814b to b58ae6d Compare December 20, 2025 01:09
@amaksimo amaksimo marked this pull request as ready for review December 20, 2025 01:14
@amaksimo amaksimo merged commit 99d173b into main Dec 20, 2025
16 checks passed
@amaksimo amaksimo deleted the use-dsql-connectors branch December 20, 2025 01:23
amaksimo pushed a commit that referenced this pull request Dec 23, 2025
Restructures Python, JavaScript, and Java examples with example_preferred as the golden path (concurrent connection pool + connector).

- Python/JS: Copied pool examples from connector repos, restored SDK-only from pre-#221
- Java: Merged pgjdbc_hikaricp into pgjdbc, restored SDK-only from pre-#198
- Added README in each alternatives/ folder explaining why pool+connector is preferred
- Added smoke tests for all examples
amaksimo pushed a commit that referenced this pull request Dec 23, 2025
Restructures Python, JavaScript, and Java examples with
example_preferred as the golden path (pool + connector).

- Python/JS: Copied pool examples from connector repos,
  restored SDK-only from pre-#221
- Java: Merged pgjdbc_hikaricp into pgjdbc,
  restored SDK-only from pre-#198
- Added README in each alternatives/ folder
- Added smoke tests for all examples
amaksimo pushed a commit that referenced this pull request Dec 23, 2025
Restructures Python, JavaScript, and Java examples with
example_preferred as the golden path (pool + connector).

- Python/JS: Copied pool examples from connector repos,
  restored SDK-only from pre-#221
- Java: Merged pgjdbc_hikaricp into pgjdbc,
  restored SDK-only from pre-#198
- Added README in each alternatives/ folder
- Added smoke tests for all examples
amaksimo added a commit that referenced this pull request Dec 23, 2025
Restructures Python, JavaScript, and Java examples with
example_preferred as the golden path (pool + connector).

- Python/JS: Copied pool examples from connector repos,
restored SDK-only from
pre-#221
- Java: Merged pgjdbc_hikaricp into pgjdbc,
restored SDK-only from
pre-#198
- Added README in each alternatives/ folder
- Added smoke tests for all examples

Following:
```
<language>/<driver>/
├── README.md
├── <config files>
├── src/
│   ├── example_preferred.<ext>  # Synced from connector (pool concurrent if available)
│   └── alternatives/
│       ├── no_connection_pool/
│       │   ├── example_with_no_connector.<ext>  # SDK-based, lives only in samples
│       │   └── example_with_no_connection_pool.<ext>  # Synced from connector
│       └── pool/
│           └── <other pool variants>  # Synced from connector
└── test/
    └── <matching test structure>
```

Co-authored-by: Aleksandar Maksimovic <alemaksi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants