You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`secrets_manager_secret_id`| String | Yes | Set this value to be the secret name or the secret ARN. |`secret_id`|`None`|
23
-
|`secrets_manager_region`| String | Yes unless the `secrets_manager_secret_id` is a Secret ARN. | Set this value to be the region your secret is in. |`us-east-2`|`us-east-1`|
24
-
|`secrets_manager_endpoint`| String | No | Set this value to be the endpoint override to retrieve your secret from. This parameter value should be in the form of a URL, with a valid protocol (ex. `http://`) and domain (ex. `localhost`). A port number is not required. |`http://localhost:1234`|`None`|
20
+
| Parameter | Value | Required | Description | Example | Default Value |
|`secrets_manager_secret_id`| String | Yes | Set this value to be the secret name or the secret ARN. |`secret_id`|`None`|
23
+
|`secrets_manager_region`| String | Yes unless the `secrets_manager_secret_id` is a Secret ARN. | Set this value to be the region your secret is in. |`us-east-2`|`us-east-1`|
24
+
|`secrets_manager_endpoint`| String | No | Set this value to be the endpoint override to retrieve your secret from. This parameter value should be in the form of a URL, with a valid protocol (ex. `http://`) and domain (ex. `localhost`). A port number is not required. |`http://localhost:1234`|`None`|
25
+
|`secrets_manager_secret_username`| String | No | Set this value to be the key in the JSON secret that contains the username for database connection. |`username_key`|`username`|
26
+
|`secrets_manager_secret_password`| String | No | SSet this value to be the key in the JSON secret that contains the password for database connection. |`password_key`|`password`|
25
27
26
28
*NOTE* A Secret ARN has the following format: `arn:aws:secretsmanager:<Region>:<AccountId>:secret:Secre78tName-6RandomCharacters`
27
29
28
30
## Secret Data
29
-
The plugin assumes that the secret contains the following properties:`username` and `password`.
31
+
The secret stored in the AWS Secrets Manager should be a JSON object containing the properties `username` and `password`. If the secret contains different key names, you can specify them with the `secrets_manager_secret_username` and `secrets_manager_secret_password` parameters.
If you specify `secrets_manager_secret_username` and `secrets_manager_secret_password`, the AWS Advanced Python Driver will parse the secret searching for those specified keys.
In this case the secret should have the following format:
74
+
```json
75
+
{
76
+
"custom_username_key": "the database username",
77
+
"custom_password_key": "the database password"
78
+
}
79
+
```
80
+
59
81
You can find a full example for [PostgreSQL](../../examples/PGSecretsManager.py), and a full example for [MySQL](../../examples/MySQLSecretsManager.py).
0 commit comments