So with Aurora Serverless v2 available we wanted to upgrade from our Postgres Serverless v1.
The steps described are basically to take a snapshot, create a new Provisioned Aurora cluster (not Serverless) and then upgrade the Provisioned Cluster to Postgres 13.6 and after that Clone the new 13.6 Cluster into a Serverless v2.
However, I get stuck on the last part as when trying to clone it I get "Serverless (incompatible minor version)" and the option to chose "Serverless" is greyed out...
What am I missing?
OK, so the information in the documentation here is very unclear: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.upgrade.html#aurora-serverless-v2.upgrade-from-serverless-v1-procedure
You shouldn't try to migrate the Cluster from Provisioned to Serverless, the option is to convert the DATABASE (Writer instance) in the Provisioned Cluster to Serverless V2!
So, here's the steps that might save someone else a few tries (and hours):
Create a Snapshot for the existing Aurora Serverless Cluster overview page (takes about 5 minutes (depending on DB size))
Open snapshots and choose to restore Snapshot to highest available PROVISIONED Aurora Cluster (for me it was Postgres 10.20), no other settings needs to be changed other than "Provisioned" and the version (this will take several minutes, about 15 minutes)
Refresh now and again using the "refresh" button (as the AWS console "refresh" isn't very reliable) to see when the cluster is ready (database doesn't need to be ready, only the Cluster!)
Once the Cluster is "available", open the Cluster and click "Modify"
Choose the DB engine version as 13.6 (this is the only version working for Aurora Serverless v2) then scroll down and click "Continue"
Select "Apply immediately" and click "Modify Cluster"
Back on the Cluster overview page, again wait for the Cluster to upgrade (this will take several minutes, about 20 minutes)
Once the Cluster and database are available, select the DATABASE and choose "Modify"
Select Serverless v2 and then "Continue"
Choose to apply Immediately and modify the database
Wait for it to modify completely and you'll have your new Serverless V2 done!
Another thing to note is that with Aurora V2 we'll apparently have a Cluster and a database attached:
I'd assume this is because with Serverless V2 (which is pretty cool!) you can attach additional read replica databases which will "off-load" your writer instance making it faster...
add on on #anders answer, your rds instances must be one of the instance type from this list else it will throw below error.
for supported combinations of instance class and database engine version, see the documentation.
Related
I know the question is normally the other way around, but it seems important to know how can we go back to a provisioned solution from a serverless cluster.
We will migrate to an Postgres RDS serverless cluster in a few days and we would like to know how can we go back to a provisioned cluster if something goes wrong with the serverless solution. I didn't find any answers, as DMS doesn't seem to allow serverless sources.
Is there any way to achieve this, other than using pg_dump?
Thank you!
It depends on the version of AWS RDS Aurora Serverless that you are using:
For Serverless v1, just create a snapshot and restore it to a provisioned cluster. Snapshots are compatible between provisioned clusters and Serverless v1.
Serverless v2 uses the same clusters as provisioned instances (see the first paragraph of the AWS Docs for Serverless v2). Select the serverless instance of the cluster, click the "Modify" button and select another "DB instance class" under "Instance configuration". Note: You can also have serverless and provisioned instances in the same cluster, which allows for more complex migration paths like first adding a new instance, remove the old one and using writer instance promotion.
You may first want to test those methods with test data even though I validated them for you with empty databases.
Please also keep in mind that Severless v2 only released in April 2022 (after a long beta testing period solely with MySQL), so you may want to thoroughly test it if you want to use it in production.
Where can I change the Aurora Serverless engine version/family through the AWS web console?
If I click Modify on the database page I don't see any setting (but that's where it is for non-Serverless databases), nor do I see a setting in Parameter Groups.
Sadly, you can't change it directly. For the aurora serverless you can only modify:
Minimum Aurora capacity unit
Maximum Aurora capacity unit
Timeout action
Pause after inactivity
If you want to change version of Aurora Serverless (for example from MySQL 5.6 to 5.7), you can snapshot your Aurora Serverless DB, and the restore to new Serverless MySQL to new version. This will allow you to change MySQL version, but not from MySQL to PostgreSQL. For that probably need to use AWS DMS.
I am working on a project where we are creating a new region for resilience purpose.
As we create a new Region for the project, we also plan to create a Read replica of Aurora MySQL DB.
My question here has two parts
If the project in existing region goes down, how to make the read replica of Aurora MySQL in the other region as the new Master and writable?
I searched through few videos and stackoverflow questions and I do understand how to make the RDS mysql as writable instance. but, I don't see how to make such a "read-only" parameter modification in Aurora MySQL!
How could I do this change with a Jenkins Job?
Any help is highly appreciated!
Thanks!
You can use the AWS CLI for this, specifically the:
aws rds promote-read-replica-db-cluster
command which contrary to the name actually applies to Aurora as stated in the documentation for the command:
Note:
This action only applies to Aurora DB clusters.
You can find more information in the AWS documentation for Aurora, specifically the section on Promoting a Read Replica to Be a DB Cluster.
Seems like you should be able to use the Jenkins AWS plugin but there are many options.
We are using AWS RDS Aurora MySQL 5.6 for our production database.
AWS launched MySQL 5.7 compatible Aurora engine on 6th Feb, 2018.
I dont see any option in "modify instance" to change engine to MySQL 5.7
I dont see any option in restore snapshot to database with MySQL 5.7 either.
We want to do this upgrade with least downtime. Pls suggest what could be done here.
According to this link, you cannot upgrade an in-place database, you will need to restore a snapshot of the existing database and change the engine version during that process. These restrictions appear to be only temporary and may be lifted at a later point to allow for in-place upgra
The comments above are true; there is still no in place upgrade for 5.6 to 5.7; the process is still pretty easy though;
1) Go to the RDS dashboard, in the left hand menu there is a menu item called 'Snapshots'; you can either click on this if you are ok using a recent snapshot; otherwise select your database & on the actions drop down & choose 'Take Snapshot'
2) In snapshots simply select your snapshot & choose 'Restore Snapshot' from the actions drop down; it will automatically duplicate a bunch of your previous settings. Its at this juncture you can select the new database engine of 5.7
All and all you should allow for at least a half an hour of downtime for the whole process. Probably a couple of hours to be on the safe side.
You can now perform in-place upgrade from Aurora MyQSL from 5.6 to 5.7
Only a matter of invoking modify-db-cluster or modify-global-cluster (if you are using global clusters of course).
More in the docs (including how to do this using the AWS console).
Easiest way is:
Take a manual snapshot first of Aurora MySQL 5.6 cluster.
Then, create a new Aurora MySQL 5.7 using that manual snapshot which was taken in step 1
Your credentials would be same as that of the older 5.6 cluster.
Verify if data is correct.
Need was to upgrade the AWS RDS Aurora MySQL from 5.6 to 5.7 without causing any downtime to our production. Being a SaaS solution, we could not afford any downtime.
Background
We have distributed architecture based on micro services running in AWS Fargate and AWS Lambda. For data persistency AWS RDS Aurora MySQL is used. While there are other services being used, those are not of interest in this use case.
Approach
After a good deliberation on in place upgrade by declaring a downtime and maintenance window, we realized that having zero downtime upgrade is the need. As without which we would have created a processing backlog for us.
High level approach was:
Create an AWS RDS Cluster with the required version and copy the data from the existing RDS Cluster to this new Cluster
Setup AWS DMS(Data Migration Service) between these two clusters
Once the replication is done and is ongoing then switch the application to point to the new DB. In our case, the micro-services running in AWS Fargate has to upgraded with the new end point and it took care of draining the old and using the new.
For Complete post please check out
https://bharatnainani1997.medium.com/aws-rds-major-version-upgrade-with-zero-downtime-5-6-to-5-7-b0aff1ea1f4
To manage an update for a DB instance or 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 Instances to manage updates for a DB instance, or Clusters to manage updates for an Aurora DB cluster.
Select the checkbox for the DB instance or DB cluster that has a required update.
Choose Instance actions for a DB instance, or Actions for a DB cluster, and then 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 select Defer upgrade.
I can't seem to find much information about the "migrate snapshot" option in the AWS/RDS documentation.
Is it correct to assume that it creates a new, totally separate database based on that snapshot and leaves the original database intact?
The Migrate Snapshot function spins up a new Aurora DB Cluster from a MySQL DB snapshot.
The Migrate Snapshot button in AWS Web Console is currently active only for MySQL snapshots. Naming and appearance of the button is unfortunate. It would probably be more intuitive to only show that button for when a MySQL snapshot is selected and name it as Restore to Aurora or Launch Aurora Cluster.
You can find more information about that function in the AWS RDS user guide under Migrating an RDS MySQL Snapshot to Aurora subsection of the Aurora on Amazon RDS section.
Yes, if you spin up an instance from an RDS snapshot, it creates a completely new instance and leaves the original intact.