1. Launch a new AWS RDS Instance from the AWS Console
First, check the distribution and version of the mysql service that is running locally on your Open edX instance by issuing the following command
mysql Ver 14.14 Distrib 5.6.32, for debian-linux-gnu (x86_64) using EditLine wrapper
In this example, the value “5.6.32” is the most important piece of information. Ideally, you’ll create an AWS RDS instance that exactly matches this version number but if that isn’t possible then get as close as you can, selecting a version that is equal to or greater than the version installed locally on your Open edX instance. In my example case above the best I could do was version 5.6.34
2. Important: Create a new EC2 Security Group for MySQL
You should create a separate EC2 Security Group for your new AWS RDS MySQL instance, as follows:
This firewall configuration limits remote access of the server to MySQL, regardless of whatever other services might still be installed and running internally on the server. Note that on the first row, SSH, you should try to limit access to your bastion server, if you use one.
Other AWS RDS Settings
I’m going to skip past other settings, but, I will share a few observations with you. First and most importantly, you probably do not need anything greater than t2.medium (2-CPU, 4Gb RAM) in terms of underlying processing power for your AWS RDS instance. Open edX runs on Django, and most of the queries that Django generates rely on a primary key and are therefore highly efficient. There is very little in the way of SQL aggregation queries in Open edX applications. Therefore, the mysql service itself requires minimal processing power. Second, You can mostly follow the suggested defaults for other settings with the one exception of “Availability” — you probably do not need a redundant instance operating in a different data center. This doubles your cost, and you’ll probably never need it.
3. Take Note of The AWS RDS Instance Host Name That Was Automatically Created
You’ll access your new AWS RDS MySQL service via the hostname, which is automatically assigned by AWS when you create the new RDS instance. Take note of this value, which will be titled, “Endpoint”