Applying updates to a DB instance
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.
Note
For RDS for SQL Server, an update to the underlying operating system can be applied by stopping and starting your DB instance, or by scaling your DB instance class up and then down again.
To manage an update for a DB instance
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 instance 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 instance, use the apply-pending-maintenance-action AWS CLI command.
Example
For Linux, macOS, or Unix:
aws rds apply-pending-maintenance-action \ --resource-identifier
arn:aws:rds:us-west-2:001234567890:db:mysql-db
\ --apply-actionsystem-update
\ --opt-in-typeimmediate
For Windows:
aws rds apply-pending-maintenance-action ^ --resource-identifier
arn: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:
aws rds describe-pending-maintenance-actions \ --resource-identifier
arn:aws:rds:us-west-2:001234567890:db:mysql-db
For Windows:
aws rds describe-pending-maintenance-actions ^ --resource-identifier
arn:aws:rds:us-west-2:001234567890:db:mysql-db
You can also return a list of resources for a DB instance by
specifying the --filters
parameter of the describe-pending-maintenance-actions
AWS CLI command. The format for the
--filters
command is
Name=
.filter-name
,Value=resource-id
,...
The following are the accepted values for the Name
parameter of a filter:
-
db-instance-id
– Accepts a list of DB instance identifiers or Amazon Resource Names (ARNs). The returned list only includes pending maintenance actions for the DB instances identified by these identifiers or ARNs. -
db-cluster-id
– Accepts a list of DB cluster identifiers or ARNs for Amazon Aurora. The returned list only includes pending maintenance actions for the DB clusters identified by these identifiers or ARNs.
For example, the following example returns the pending maintenance actions for the sample-instance1
and
sample-instance2
DB instances.
Example
For Linux, macOS, or Unix:
aws rds describe-pending-maintenance-actions \ --filters Name=db-instance-id,Values=sample-instance1,sample-instance2
For Windows:
aws rds describe-pending-maintenance-actions ^ --filters Name=db-instance-id,Values=sample-instance1,sample-instance2
To apply an update to a DB instance, call the Amazon RDS API
ApplyPendingMaintenanceAction
operation.
To return a list of resources that have at least one pending update, call the Amazon RDS API DescribePendingMaintenanceActions
operation.