Can I have multi-master aws aurora in serverless v2? - amazon-web-services

I do not see option to have a cluster with two writers in serverless v2 for both
Amazon Aurora MySQL-Compatible Edition
Amazon Aurora PostgreSQL-Compatible Edition
Now UI propose us to create a read replica for faster failover.
But is it possible to have a ready stand by writer? So in case if there is an upgrade or something and I can not get connection opened for a writer, I can just immediately switch to another writer.
Is it possible to have it like this or maybe I missed/misunderstood something?
Documentation for creation of multi master db is outdated
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html#aurora-multi-master-creating

Correct, multi-master for Aurora is tied to the MySQL 5.6-compatible edition. It isn't available for MySQL 5.7-compatible, MySQL 8.0-compatible, or PostgreSQL-compatible editions. Serverless v2 requires relatively recent versions of the MySQL and PostgreSQL engines, so multi-master definitely isn't available there.
Let's consider the possibilities for the single-writer case, because that's what's available in the versions that are compatible with Serverless v2 and aren't approaching EOL.
If there's an unplanned outage for the writer, Aurora automatically promotes a reader to take its place (failover).
More on failover generally here:
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html#Concepts.AuroraHighAvailability.Instances
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html#Aurora.Managing.FaultTolerance
Aurora PostgreSQL has some features and settings to minimize failover time:
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.BestPractices.FastFailover.html
If you want to e.g. switch the writer to a higher-capacity instance class, traditionally the way to do that was to make that change on a reader and then promote that to be the new writer by doing a manual failover. Serverless v2 does such capacity changes automatically without a reboot, and it preserves open connections too. So this former reason for reboots/outages isn't applicable in Serverless v2.
In Aurora MySQL 2.10 and higher, you can reboot the writer and the reader instances are still available for queries while the writer is rebooting: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_RebootCluster.html

From the documentation:
Currently, multi-master clusters require Aurora MySQL version 1, which is compatible with MySQL 5.6. When specifying the DB engine version in the AWS Management Console, AWS CLI, or RDS API, choose 5.6.10a
Here is the link for reference: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html

Related

Is it possible to implement an auto scaling RDS enviroment with MariaDB in AWS?

I'm googling about having a cluster of mariadb at AWS and make it work with auto scaling feature, but I didn't find the option "Add autoscaling replica" that appears in some tutorials. Since all tutorial samples that I have seen are using Aurora with MySql, I'm wondering if it's possible do this with mariadb. I would like to simply migrate to mysql but I need the RETURNING clause and some Uuid functions of mariadb-10.5, so I'm stucked to mariadb.
AWS RDS Autoscaling is only available for Aurora. Aurora currently has PostgreSQL and MySQL compatibility.

Create Aurora read replica option is missing from RDS Console

I have PostgreSQL DB running on Version 10.15 for which I like to created an Aurora Read Replica as mentioned in this official document, however in the AWS console I only have the option of Create Read Replica only and not Create Aurora Read Replica. The option is completely missing.
If I choose to Create Read Replica, it then just create another PostgreSQL instance instead of Aurora PostGres, and that's is not what I want.
P.s: I have auto back-up enabled for that instance
You must be running RDS PostegreSQL, as there is no Aurora PostegreSQL 10.15.
For the RDS, you only create read replicas as indicated in the AWS Console. Aurora replicas are only for Aurora PostgreSQL (not RDS PostgreSQL).
If I understood it correct, you have an RDS PostgreSQL instance (not Aurora) and want to create an Aurora PostgreSQL Read Replica from it. With steps mention on documentation link you shared.
This is possible and I could reproduce it, but not for all version.
I tested with MySQL, not with PostgreSQL, but the mechanism is the same.
I created one RDS MySQL (not Aurora) version 5.7.33 and from this one I can create Aurora Read Replica, as you can see from picture below.
The other one I created RDS MySQL (not Aurora) version 8.0.23, this one doesn't show me the option to create Aurora Read Replica.
Update
The rules to have this option enable is:
The same major version between RDS and Aurora
Minor version equal or higher on Aurora.
With versions we have today on RDS PostgreSQL and Aurora PostgreSQL, none match the rules above.
But we have a match for MySQL, as I showed.
If you want to migrate from RDS to Aurora, even though this options is not available you have other options, like snapshot and DMS.
With regards to Aurora MySQL,
Aurora MySQL 2. x versions are compatible with MySQL 5.7 and
Aurora MySQL 1. x versions are compatible with MySQL 5.6.
When creating a new Aurora MySQL DB cluster (including restoring a snapshot), you have the option of choosing compatibility with either MySQL 5.7 or MySQL 5.6.
This implies that When creating the RDS for MySQL instance, you are limited to versions of MySQL 5.6 or 5.7 (if you intend to create Aurora MySQL read replicas)
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.2044.html

Change Aurora Serverless engine version/family in AWS console

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.

How to upgrade AWS RDS Aurora MySQL 5.6 to 5.7

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.

Does Amazon Aurora support Updatable Views

I tried looking online but I couldn't find anything. We are trying to see if Amazon Aurora supports Updatable Views. We are not using Amazon Aurora yet but the plan is to use it in future.
Thanks,
Sridhar.
Because Amazon Aurora implements the Postgres and Mysql engines directly, you can expect all the features of the engine and version that you use on Aurora to work the same way. Updatable views are available in the current database engine versions for both of these engines in Amazon Aurora, and require the same configuration regarding rules and grants as you'd find on a non-Aurora environment.
Postgres engine versions: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html
Mysql engine versions: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html