Skip to content

Commit

Permalink
chore(RDSUnappliedParameters): Add mitigations commands
Browse files Browse the repository at this point in the history
  • Loading branch information
vmercierfr committed Nov 29, 2023
1 parent 89bd806 commit ad002e0
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions content/runbooks/rds/RDSUnappliedParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RDS parameter groups have `dynamic` and `static` parameters:

1. Check instance status

If instance is in `creating` status, the parameter group should be applied automatically by AWS in few minutes.
If the instance is in `creating` status, the parameter group should be applied automatically by AWS in a few minutes.

1. Identify the RDS parameter group used by the RDS instance

Expand Down Expand Up @@ -113,8 +113,44 @@ RDS parameter groups have `dynamic` and `static` parameters:

## Mitigation

- Apply RDS parameter group changes by restarting the RDS instance
You must restart the RDS instance to fix the `pending-reboot` apply status.

{{< hint warning >}}
**Important**

The following mitigation measures will restart the RDS instance, resulting in an **interruption of service**. You may consider shutting down the database clients and informing users first.
{{< /hint >}}

1. Find a suitable time slot to restart the instance

1. Apply RDS parameter group changes by restarting the RDS instance

```bash
aws rds reboot-db-instance --db-instance-identifier ${DB_IDENTIFIER}
```

This operation is performed asynchronously, it could take several minutes.

1. Check parameter group apply status is now `in-sync`.

```bash
aws rds describe-db-instances --db-instance-identifier ${DB_IDENTIFIER} --query 'DBInstances[0].DBParameterGroups[0]'
```

<details>
<summary>Example</summary>

```bash
$ aws rds describe-db-instances --db-instance-identifier ${DB_IDENTIFIER} --query 'DBInstances[0].DBParameterGroups[0]'
{
"DBParameterGroupName": "postgres14-primary",
"ParameterApplyStatus": "in-sync"
}
```

</details>

## Additional resources

- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html>
- [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html)
- [Rebooting a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html)

0 comments on commit ad002e0

Please sign in to comment.