Skip to content

Commit 0373eee

Browse files
authored
docs: required permissions (#1061)
1 parent a7f3d02 commit 0373eee

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/using-the-python-driver/SupportForRDSMultiAzDBCluster.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ The process of using the AWS Advanced Python Driver with RDS Multi-AZ DB Cluster
88

99
### MySQL
1010

11+
There are permissions that must be granted to all non-administrative users who need database access. Without proper access, these users cannot utilize many of the driver's advanced features, including failover support. To grant the necessary permissions to non-administrative users, execute the following statement:
12+
13+
```sql
14+
GRANT SELECT ON mysql.rds_topology TO 'non-admin-username'@'%'
15+
```
16+
1117
Preparing a connection with MySQL in a Multi-AZ Cluster remains the same as before:
1218

1319
```python
@@ -32,6 +38,12 @@ Per AWS documentation, the `rds_tools` extension must be manually installed usin
3238
CREATE EXTENSION rds_tools;
3339
```
3440

41+
The extension must be granted to all non-administrative users who need database access. Without access to `rds_tools`, non-admin users cannot utilize many of the driver's advanced features, including failover support. To grant the necessary permissions to non-administrative users, execute the following statement:
42+
43+
```sql
44+
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA rds_tools TO non-admin-username;
45+
```
46+
3547
Then, prepare the connection with:
3648

3749
```python

docs/using-the-python-driver/using-plugins/UsingTheBlueGreenPlugin.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The AWS Python Driver leverages the Blue/Green Deployment approach by intelligen
2323
> Additional Requirements:
2424
>
2525
> - AWS cluster and instance endpoints must be directly accessible from the client side
26+
> - :warning: If connecting with non-admin users, permissions must be granted to the users so that the blue/green metadata table/function can be properly queried. If the permissions are not granted, the metadata table/function will not be visible and blue/green plugin functionality will not work properly. Please see the [Connecting with non-admin users](#connecting-with-non-admin-users) section below.
2627
> - Connecting to database nodes using CNAME aliases is not supported
2728
>
2829
> **Blue/Green Support Behaviour and Version Compatibility:**
@@ -83,14 +84,26 @@ The plugin establishes dedicated monitoring connections to track Blue/Green Depl
8384
8485
```python
8586
props = Properties()
87+
// Configure the timeout values for all, non-monitoring connections.
8688
props["connect_timeout"] = 30
89+
// Configure different timeout values for the Blue/Green monitoring connections.
8790
props["blue-green-monitoring-connect_timeout"] = 10
8891
```
8992
9093
> [!WARNING]\
9194
> **Always ensure you provide a non-zero connect timeout value to the Blue/Green Deployment Plugin**
9295
>
9396
97+
## Connecting with non-admin users
98+
> [!WARNING]\
99+
> If connecting with non-admin users, permissions must be granted to the users so that the blue/green metadata table/function can be properly queried. If the permissions are not granted, the metadata table/function will not be visible and blue/green plugin functionality will not work properly.
100+
101+
| Environment | Required permission statements |
102+
|-------------------|-----------------------------------------------------------------------------------------------------------------------|
103+
| Aurora Postgresql | None |
104+
| RDS Postgresql | `GRANT USAGE ON SCHEMA rds_tools TO your_user;`<br>`GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA rds_tools TO your_user;` |
105+
| Aurora MySQL | `GRANT SELECT ON mysql.rds_topology TO 'your_user'@'%';`<br>`FLUSH PRIVILEGES;` |
106+
| RDS MySQL | `GRANT SELECT ON mysql.rds_topology TO 'your_user'@'%';`<br>`FLUSH PRIVILEGES;` |
94107

95108
## Plan your Blue/Green switchover in advance
96109

0 commit comments

Comments
 (0)