Set the maintenance window
Choose when minor upgrades and OS patch reboots happen, and whether minor upgrades are applied automatically.
The window is ddd:hh24:mi-ddd:hh24:mi in UTC, between one hour and one day long,
sun:05:00-sun:06:00 by default. Replace ewdb-0123456789ab with your database's id.
Prerequisites
- Permission for
rds:ModifyDBInstance. - In the console, also
rds:DescribeDBInstancesto open the database's page (without it the page is not found).
Set the window
- Open the database, then choose Maintenance.
- Under Maintenance window, choose the start and end.
- Choose Save window. The section shows when the window next opens.
- (Optional) Select or clear Apply new minor versions automatically in the window. The change is saved as soon as you select or clear the check box.
dcloud rds instances modify-maintenance ewdb-0123456789ab \
--maintenance-window tue:02:00-tue:03:00 --auto-minor-version-upgradeUse --no-auto-minor-version-upgrade to turn automatic minor upgrades off.
PATCH /rds/api/instances/ewdb-0123456789ab/maintenance
{ "maintenanceWindow": "tue:02:00-tue:03:00", "autoMinorVersionUpgrade": true }Not available in Terraform. The maintenance window is not an argument of `dcloud_db_instance`.
Result
With autoMinorVersionUpgrade on (the default), a pending minor is applied in the next window. An
upgrade starts only with enough of the window left to finish, and a running one is never cut off.
With it off, upgrades happen only when you ask. A new database is left alone for its first day: its
first window is the first one that opens a day after it was created.
The window also takes OS patch reboots, one node at a time; see
Versions and maintenance. GET /rds/api/instances/{id}/maintenance
returns the versions per node, the pending minor, the window and when it next opens.