The Custom Endpoint Plugin adds support for RDS custom endpoints. When the Custom Endpoint Plugin is in use, the wrapper will analyse custom endpoint information to ensure instances used in connections are part of the custom endpoint being used. This includes connections used in failover and read-write splitting.
Warning
This plugin requires the AWS SDK for Python - Boto3. Boto3 is a runtime dependency and must be resolved. It can be installed via pip install boto3.
Warning
To use this plugin, you must provide valid AWS credentials. The AWS SDK relies on the AWS SDK credential provider chain to authenticate with AWS services. If you are using temporary credentials (such as those obtained through AWS STS, IAM roles, or SSO), be aware that these credentials have an expiration time. AWS SDK exceptions will occur and the plugin will not work properly if your credentials expire without being refreshed or replaced. To avoid interruptions:
- Ensure your credential provider supports automatic refresh (most AWS SDK credential providers do this automatically)
- Monitor credential expiration times in production environments
- Configure appropriate session durations for temporary credentials
- Implement proper error handling for credential-related failures
For more information on configuring AWS credentials, see our AWS credentials documentation.
- If needed, create a custom endpoint using the AWS RDS Console:
- If needed, review the documentation about creating a custom endpoint.
- Add the plugin code
custom_endpointto thepluginsparameter value, or to the current driver profile. - If you are using the failover plugin, set the failover parameter
failover_modeaccording to the custom endpoint type. For example, if the custom endpoint you are using is of typeREADER, you can setfailover_modetostrict_reader, or if it is of typeANY, you can setfailover_modetoreader_or_writer. - Specify parameters that are required or specific to your case.
| Parameter | Value | Required | Description | Default Value | Example Value |
|---|---|---|---|---|---|
custom_endpoint_info_refresh_rate_ms |
Integer | No | Controls how frequently custom endpoint monitors fetch custom endpoint info, in milliseconds. | 30000 |
20000 |
custom_endpoint_idle_monitor_expiration_ms |
Integer | No | Controls how long a monitor should run without use before expiring and being removed, in milliseconds. | 900000 (15 minutes) |
600000 |
wait_for_custom_endpoint_info |
Boolean | No | Controls whether to wait for custom endpoint info to become available before connecting or executing a method. Waiting is only necessary if a connection to a given custom endpoint has not been opened or used recently. Note that disabling this may result in occasional connections to instances outside of the custom endpoint. | true |
true |
wait_for_custom_endpoint_info_timeout_ms |
Integer | No | Controls the maximum amount of time that the plugin will wait for custom endpoint info to be made available by the custom endpoint monitor, in milliseconds. | 5000 |
7000 |