Applying updates for a DB instance - Amazon Relational Database Service

Applying updates for 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 RDS console, AWS Command Line Interface (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
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Databases.

  3. Choose the DB instance that has a required update.

  4. For Actions, choose one of the following:

    • Upgrade now

    • Upgrade at next window

      Note

      If you choose Upgrade 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-action system-update \ --opt-in-type immediate

For Windows:

aws rds apply-pending-maintenance-action ^ --resource-identifier arn:aws:rds:us-west-2:001234567890:db:mysql-db ^ --apply-action system-update ^ --opt-in-type immediate
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.