Maintaining an Amazon Aurora DB cluster
Periodically, Amazon RDS performs maintenance on Amazon RDS resources. The following topics describe these maintenance actions and how to apply them.
Overview of DB cluster maintenance updates
Maintenance most often involves updates to the following resources in your DB cluster:
-
Underlying hardware
-
Underlying operating system (OS)
-
Database engine version
Updates to the operating system most often occur for security issues. We recommend that you do them as soon as possible. For more information about operating system updates, see Operating system updates for Aurora DB clusters.
Topics
Offline resources during maintenance updates
Some maintenance items require that Amazon RDS take your DB cluster offline for a short time. Maintenance items that require a resource to be offline include required operating system or database patching. Required patching is automatically scheduled only for patches that are related to security and instance reliability. Such patching occurs infrequently, typically once every few months. It seldom requires more than a fraction of your maintenance window.
Deferred DB instanceand DB cluster modifications
Deferred DB cluster and instance modifications that you have chosen not to apply immediately are applied during the maintenance window. For example, you might choose to change DB instance classes or cluster or DB parameter groups during the maintenance window. Such modifications that you specify using the pending reboot setting don't show up in the Pending maintenance list. For information about modifying a DB cluster, see Modifying an Amazon Aurora DB cluster.
To see the modifications that are pending for the next maintenance
window, use the describe-db-clustersPendingModifiedValues field.
Eventual consistency for the DescribePendingMaintenanceActions API
The Amazon RDS DescribePendingMaintenanceActions API follows an eventual
consistency model. This means that the result of the
DescribePendingMaintenanceActions command might not be immediately
visible to all subsequent RDS commands. Keep this in mind when you use
DescribePendingMaintenanceActions immediately after using a previous
API command.
Eventual consistency can affect the way you managed your maintenance updates. For
example, if you run the ApplyPendingMaintenanceActions command to update
the database engine version for a DB cluster, it will eventually be visible to
DescribePendingMaintenanceActions. In this scenario,
DescribePendingMaintenanceActions might show that the maintenance
action wasn't applied even though it was.
To manage eventual consistency, you can do the following:
-
Confirm the state of your DB cluster before you run a command to modify it. Run the appropriate
DescribePendingMaintenanceActionscommand using an exponential backoff algorithm to ensure that you allow enough time for the previous command to propagate through the system. To do this, run theDescribePendingMaintenanceActionscommand repeatedly, starting with a couple of seconds of wait time, and increasing gradually up to five minutes of wait time. -
Add wait time between subsequent commands, even if a
DescribePendingMaintenanceActionscommand returns an accurate response. Apply an exponential backoff algorithm starting with a couple of seconds of wait time, and increase gradually up to about five minutes of wait time.
Viewing pending maintenance updates
View whether a maintenance update is available for your DB cluster by using the RDS console, the AWS CLI, or the RDS API. If an update is available, it is indicated in the Maintenance column for the DB cluster on the Amazon RDS console, as shown in this figure.
If no maintenance update is available for a DB cluster, the column value is none for it.
If a maintenance update is available for a DB cluster, the following column values are possible:
-
required – The maintenance action will be applied to the resource and can't be deferred indefinitely.
-
available – The maintenance action is available, but it will not be applied to the resource automatically. You can apply it manually.
-
next window – The maintenance action will be applied to the resource during the next maintenance window.
-
In progress – The maintenance action is being applied to the resource.
If an update is available, you can do one of the following:
-
If the maintenance value is next window, defer the maintenance actions by choosing Defer upgrade from Actions. You can't defer a maintenance action that has already started.
-
Apply the maintenance actions immediately.
-
Apply the maintenance actions during your next maintenance window.
-
Take no action.
To take an action by using the AWS Management Console
-
Choose the DB instance or cluster to show its details.
-
Choose Maintenance & backups. The pending maintenance actions appear.
-
Choose the action to take, then choose when to apply it.
The maintenance window determines when pending operations start, but doesn't limit the total run time of these operations. Maintenance operations aren't guaranteed to finish before the maintenance window ends, and can continue beyond the specified end time. For more information, see Amazon RDS maintenance window.
You can also view whether a maintenance update is available for your DB cluster by running the describe-pending-maintenance-actions AWS CLI command.
For information about applying maintenance updates, see Applying updates to a DB cluster.
Maintenance actions for Amazon Aurora
The following maintenance actions apply to Aurora DB clusters:
-
os-upgrade– Update the operating systems of all the DB instances in the DB cluster, using rolling upgrades. For more information, see Operating system updates for Aurora DB clusters. -
serverless-platform-version-update– Update the platform version of all the serverless DB instances in the DB cluster, using rolling upgrades. For more information about platform versions, see Aurora serverless capacity. -
system-update– Patch the DB engine for Aurora PostgreSQL.
The following maintenance actions apply to Aurora DB instances:
-
ca-certificate-rotation– Update the Amazon RDS Certificate Authority certificate for the DB instance. -
hardware-maintenance– Perform maintenance on the underlying hardware for the DB instance. -
system-update– Update the operating system for the DB instance.
Choosing the frequency of Aurora MySQL maintenance updates
You can control whether Aurora MySQL upgrades happen frequently or rarely for each DB cluster. The best choice depends on your usage of Aurora MySQL and the priorities for your applications that run on Aurora. For information about the Aurora MySQL long-term stability (LTS) releases that require less frequent upgrades, see Aurora MySQL long-term support (LTS) releases.
You might choose to upgrade an Aurora MySQL cluster rarely if some or all of the following conditions apply:
-
Your testing cycle for your application takes a long time for each update to the Aurora MySQL database engine.
-
You have many DB clusters or many applications all running on the same Aurora MySQL version. You prefer to upgrade all of your DB clusters and associated applications at the same time.
-
You use both Aurora MySQL and RDS for MySQL. You prefer to keep the Aurora MySQL clusters and RDS for MySQL DB instances compatible with the same level of MySQL.
-
Your Aurora MySQL application is in production or is otherwise business-critical. You can't afford downtime for upgrades outside of rare occurrences for critical patches.
-
Your Aurora MySQL application isn't limited by performance issues or feature gaps that are addressed in subsequent Aurora MySQL versions.
If the preceding factors apply to your situation, you can limit the number of forced upgrades for an Aurora MySQL DB cluster. You do so by choosing a specific Aurora MySQL version known as the "Long-Term Support" (LTS) version when you create or upgrade that DB cluster. Doing so minimizes the number of upgrade cycles, testing cycles, and upgrade-related outages for that DB cluster.
You might choose to upgrade an Aurora MySQL cluster frequently if some or all of the following conditions apply:
-
The testing cycle for your application is straightforward and brief.
-
Your application is still in the development stage.
-
Your database environment uses a variety of Aurora MySQL versions, or Aurora MySQL and RDS for MySQL versions. Each Aurora MySQL cluster has its own upgrade cycle.
-
You are waiting for specific performance or feature improvements before you increase your usage of Aurora MySQL.
If the preceding factors apply to your situation, you can enable Aurora to apply important upgrades more frequently. To do so, upgrade an Aurora MySQL DB cluster to a more recent Aurora MySQL version than the LTS version. Doing so makes the latest performance enhancements, bug fixes, and features available to you more quickly.
Amazon RDS maintenance window
The maintenance window is a weekly time interval during which any system changes are applied. Every DB cluster has a weekly maintenance window. The maintenance window is an opportunity to control when modifications and software patching occur. For more information about adjusting the maintenance window, see Adjusting the preferred DB cluster maintenance window.
RDS consumes some of the resources on your DB cluster while maintenance is being applied. You might observe a minimal effect on performance. For a DB instance, on rare occasions, a Multi-AZ failover might be required for a maintenance update to complete.
If a maintenance event is scheduled for a given week, it's initiated during the 30-minute maintenance window you identify. Most maintenance events also complete during the 30-minute maintenance window, although larger maintenance events may take more than 30 minutes to complete. The maintenance window is paused when the DB cluster is stopped.
The 30-minute maintenance window is selected at random from an 8-hour block of time per region. If you don't specify a maintenance window when you create the DB cluster, RDS assigns a 30-minute maintenance window on a randomly selected day of the week.
The following table shows the time blocks for each AWS Region from which default maintenance windows are assigned.
| Region Name | Region | Time Block |
|---|---|---|
| US East (N. Virginia) | us-east-1 | 03:00–11:00 UTC |
| US East (Ohio) | us-east-2 | 03:00–11:00 UTC |
| US West (N. California) | us-west-1 | 06:00–14:00 UTC |
| US West (Oregon) | us-west-2 | 06:00–14:00 UTC |
| Africa (Cape Town) | af-south-1 | 03:00–11:00 UTC |
| Asia Pacific (Hong Kong) | ap-east-1 | 06:00–14:00 UTC |
| Asia Pacific (Hyderabad) | ap-south-2 | 06:30–14:30 UTC |
| Asia Pacific (Jakarta) | ap-southeast-3 | 08:00–16:00 UTC |
| Asia Pacific (Malaysia) | ap-southeast-5 | 09:00–17:00 UTC |
| Asia Pacific (Melbourne) | ap-southeast-4 | 11:00–19:00 UTC |
| Asia Pacific (Mumbai) | ap-south-1 | 06:00–14:00 UTC |
| Asia Pacific (New Zealand) | ap-southeast-6 | 13:00–21:00 UTC |
| Asia Pacific (Osaka) | ap-northeast-3 | 22:00–23:59 UTC |
| Asia Pacific (Seoul) | ap-northeast-2 | 13:00–21:00 UTC |
| Asia Pacific (Singapore) | ap-southeast-1 | 14:00–22:00 UTC |
| Asia Pacific (Sydney) | ap-southeast-2 | 12:00–20:00 UTC |
| Asia Pacific (Taipei) | ap-east-2 | 9:00–17:00 UTC |
| Asia Pacific (Thailand) | ap-southeast-7 | 8:00–16:00 UTC |
| Asia Pacific (Tokyo) | ap-northeast-1 | 13:00–21:00 UTC |
| Canada (Central) | ca-central-1 | 03:00–11:00 UTC |
| Canada West (Calgary) | ca-west-1 | 18:00–02:00 UTC |
| China (Beijing) | cn-north-1 | 06:00–14:00 UTC |
| China (Ningxia) | cn-northwest-1 | 06:00–14:00 UTC |
| Europe (Frankfurt) | eu-central-1 | 21:00–05:00 UTC |
| Europe (Ireland) | eu-west-1 | 22:00–06:00 UTC |
| Europe (London) | eu-west-2 | 22:00–06:00 UTC |
| Europe (Milan) | eu-south-1 | 02:00–10:00 UTC |
| Europe (Paris) | eu-west-3 | 23:59–07:29 UTC |
| Europe (Spain) | eu-south-2 | 02:00–10:00 UTC |
| Europe (Stockholm) | eu-north-1 | 23:00–07:00 UTC |
| Europe (Zurich) | eu-central-2 | 02:00–10:00 UTC |
| Israel (Tel Aviv) | il-central-1 | 03:00–11:00 UTC |
| Mexico (Central) | mx-central-1 | 19:00–3:00 UTC |
| Middle East (Bahrain) | me-south-1 | 06:00–14:00 UTC |
| Middle East (UAE) | me-central-1 | 05:00–13:00 UTC |
| South America (São Paulo) | sa-east-1 | 00:00–08:00 UTC |
| AWS GovCloud (US-East) | us-gov-east-1 | 17:00–01:00 UTC |
| AWS GovCloud (US-West) | us-gov-west-1 | 06:00–14:00 UTC |
Adjusting the preferred DB cluster maintenance window
The Aurora DB cluster maintenance window should fall at the time of lowest usage and thus might need modification from time to time. Your DB cluster is unavailable during this time only if the updates that are being applied require an outage. The outage is for the minimum amount of time required to make the necessary updates.
Note
For upgrades to the database engine, Amazon Aurora manages the preferred maintenance window for a DB cluster and not individual instances.
To adjust the preferred DB cluster maintenance window
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. -
In the navigation pane, choose Databases.
-
Choose the DB cluster for which you want to change the maintenance window.
-
Choose Modify.
-
In the Maintenance section, update the maintenance window.
-
Choose Continue.
On the confirmation page, review your changes.
-
To apply the changes to the maintenance window immediately, choose Immediately in the Schedule of modifications section.
-
Choose Modify cluster to save your changes.
Alternatively, choose Back to edit your changes, or choose Cancel to cancel your changes.
To adjust the preferred DB cluster maintenance window, use the AWS CLI modify-db-cluster command with the following
parameters:
-
--db-cluster-identifier -
--preferred-maintenance-window
Example
The following code example sets the maintenance window to Tuesdays from 4:00–4:30 AM UTC.
For Linux, macOS, or Unix:
aws rds modify-db-cluster \ --db-cluster-identifiermy-cluster\ --preferred-maintenance-windowTue:04:00-Tue:04:30
For Windows:
aws rds modify-db-cluster ^ --db-cluster-identifiermy-cluster^ --preferred-maintenance-windowTue:04:00-Tue:04:30
To adjust the preferred DB cluster maintenance window, use the Amazon RDS ModifyDBCluster API operation with the following
parameters:
-
DBClusterIdentifier -
PreferredMaintenanceWindow
Applying updates to a DB cluster
With Amazon RDS, you can choose when to apply maintenance operations. You can decide when Amazon RDS applies updates by using the AWS Management Console, AWS CLI, or RDS API.
To manage an update for a DB cluster
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. -
In the navigation pane, choose Databases.
-
Choose the DB cluster that has a required update.
-
For Actions, choose one of the following:
-
Patch now
-
Patch at next window
Note
If you choose Patch at next window and later want to delay the update, you can choose Defer upgrade. You can't defer a maintenance action if it has already started.
To cancel a maintenance action, modify the DB instance and disable Auto minor version upgrade.
-
To apply a pending update to a DB cluster, use the apply-pending-maintenance-action AWS CLI command.
Example
For Linux, macOS, or Unix:
aws rds apply-pending-maintenance-action \ --resource-identifierarn:aws:rds:us-west-2:001234567890:db:mysql-db\ --apply-actionsystem-update\ --opt-in-typeimmediate
For Windows:
aws rds apply-pending-maintenance-action ^ --resource-identifierarn:aws:rds:us-west-2:001234567890:db:mysql-db^ --apply-actionsystem-update^ --opt-in-typeimmediate
Note
To defer a maintenance action, specify undo-opt-in for --opt-in-type. You can't specify
undo-opt-in for --opt-in-type if the maintenance action has already started.
To cancel a maintenance action, run the modify-db-instance AWS CLI command and
specify --no-auto-minor-version-upgrade.
To return a list of resources that have at least one pending update, use the describe-pending-maintenance-actions AWS CLI command.
Example
For Linux, macOS, or Unix: