There are a lot of articles on the internet describing how to apply pending maintenance on AWS RDS but surprisingly very little (or none I found actually) about how to apply pending modifications. So this post serves such as much as future reference for myself as a possible resource for others.
TL;DR: Use modify-db-instance --apply-immediately
But what are the differences?
Maintenance can be anything from version upgrade to HW maintenance queued up by AWS. Modifications are user initiated changes that were not executed with “Apply immediately” flag. This can be via console, the web interface or infrastructure as code solutions like terraform which is exactly what I ran into recently.
I applied my changes via terraform and AWS had kindly put that into the modifications queue scheduled in the next maintenance window which was far too late for me. Every google search or doc pointed to the apply-pending-maintenance-action
AWS RDS action but that returned with:
1 |
An error occurred (InvalidParameterCombination) when calling the ApplyPendingMaintenanceAction operation: There is no pending system-update action for arn:aws:rds:<region>:*****:**:************ |
Of course there is the modify-db-instance
command but that requires the changes to be listed (at least my understanding from the help message) however it does work without specifying any changes only apply-immediately
which does exactly what we want. Apply all pending modifications to the RDS instance. The full command would look something like this:
1 |
aws rds modify-db-instance --db-instance-identifier my-db-instance --apply-immediately |
Also take a note that AWS commands are somewhat inconsistent. While describe-pending-maintenance-actions
, describe-db-instances
and a few others expect identified to be a full arn, this command fails if you do so.
1 |
An error occurred (InvalidParameterValue) when calling the ModifyDBInstance operation: The parameter DBInstanceIdentifier is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens. |
So in this command you have to use the short db identifier which is the name of your RDS instance.
I hope this helped you save some google time. 🙂
Recent comments