Skip to content

Add docs for SQL Alchemy ORM support#1237

Open
jonathanl-bq wants to merge 79 commits into
mainfrom
sql-alchemy-orm-docs
Open

Add docs for SQL Alchemy ORM support#1237
jonathanl-bq wants to merge 79 commits into
mainfrom
sql-alchemy-orm-docs

Conversation

@jonathanl-bq
Copy link
Copy Markdown
Contributor

Description

This PR adds documentation for SQL Alchemy ORM support.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jonathanl-bq jonathanl-bq marked this pull request as ready for review May 22, 2026 23:08

| Driver | Database Dialect |
|-------------------|------------------|
| `aws_wrapper_mysqlconnector` | `mysql` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious on this "database dialect" - is that from our wrapper or sql alchemy? if it's our wrapper should we not support aurora-mysql and the other mysql database dialects too?


The Read/Write Splitting Plugin is not supported for SQLAlchemy, since session binds already implement this functionality.

See the [official SQLAlchemy documentation on the Session API](https://docs.sqlalchemy.org/en/20/orm/session_api.html) for more information on session binds.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to see this maybe structured a different way or with some additional plugins that ARE supported. You say that there are many other plugins and then only list one so I would suggest either

  1. add to line 34 that failover is the most relevant and then keep the section as is
  2. list iam as another plugin that is helpful after failover

I would also like rw splitting to be under a header of something like "not supported" It's confusing that it is positioned the same way as failover which is supported. Adding a not supported section would also give you space to mention that lack of pg support again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could consider reworking this into a plugin compatibility section, and create a table indicating which plugins are supported and which are not (rw splitting and srw)


## Using Plugins with SQLAlchemy

The AWS Advanced Python Wrapper supports a variety of plugins that enhance your SQLAlchemy application with features like failover handling, IAM authentication, and more. Most plugins can be enabled simply by adding them to the `wrapper_plugins` parameter in your database URL.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The AWS Advanced Python Wrapper supports a variety of plugins that enhance your SQLAlchemy application with features like failover handling, IAM authentication, and more. Most plugins can be enabled simply by adding them to the `wrapper_plugins` parameter in your database URL.
The AWS Advanced Python Wrapper supports a variety of plugins that enhance your SQLAlchemy application with features like failover handling, IAM authentication, and more. Most plugins can be enabled simply by adding them to the `wrapper_plugins` parameter in your database URL.
> [!NOTE]
> SQLAlchemy reserves the `plugins` connection parameter for its own engine, pool, and dialect event listeners.
> When using SQLAlchemy, enable AWS Advanced Python Wrapper plugins (such as the Aurora Initial Connection Strategy plugin) via `wrapper_plugins`. Otherwise, use `plugins` as usual.


### Failover Plugin

The Failover Plugin provides automatic failover handling for Aurora clusters. When a database instance becomes unavailable, the plugin automatically connects to a healthy instance in the cluster.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a link to the failover plugin docs here

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.

4 participants