AWS, Cloud Computing

5 Mins Read

A Guide to Deploy Moodle with Amazon RDS


An online service called Amazon Relational Database Service (Amazon RDS) makes it simpler to set up, run, and scale a relational database in the AWS Cloud. It performs typical database administration activities and offers affordable, resizable capacity for a relational database that is industry-standard.

What is Moodle?

Moodle is a PHP-based, open-source learning management system that is released under the terms of the GNU General Public License. Moodle is utilized in schools, universities, companies, and other sectors for blended learning, distant learning, flipped classrooms, and other online learning initiatives. It enables community-sourced plugins and can be used to build customized websites with online courses.

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

Steps to Create a Database with RDS

  1. To begin, go to Amazon RDS in the AWS console. Click the orange Create database button to get started.


2. We have selected MYSQL as a database.


3. In the templates section of create wizard, select the Free Tier.


4. Put “Moodle” in the “DB instance identification” field in the Settings section. Once that is done, enter the database’s master username and password. To assist in protecting your database, pick a strong password. Because you’ll need them in a later module, keep the username and password safe.


5. Configuring connectivity and network configuration comes next. An Amazon VPC, which is a conceptually distinct network where your provided resources will reside, is where Amazon RDS instances must be built.

VPCs are a complex subject that is outside the purview of this lab. Fortunately, each region in your account has a default VPC that AWS has constructed.

Therefore, we have decided to run the RDS using the default VPC.

Moodle should be the default database name. By doing this, you can make sure that RDS initially builds the database in your MySQL instance. When connecting to your database, you will use this database name. after which select CREATE DATABASE.


Steps to Create an EC2 Instance

  1. Select the AMI as the Ubuntu Server of version 18.04


  1. Select the t2.micro instance type, and We have selected key-pair which was the default, you can also create the key-pair.


  1. Configure the security groups, and add the following type and Source type for the ec2 security group.


And then click launch instance.

Steps to SSH into the EC2 Instance

Open the cmd (command line) and run the following commands for ssh.

  • cd (folder name) where you have saved your pem file.
  • Paste the following command in cmd. (Copy the command from the ssh client)


  • Now you have successfully ssh in your EC2.

Configuring Moodle on EC2

After the ssh run the following commands.

  1. Install the programs that are needed.
  1. Install the MySQL database service.


4. Write the password which you have given in rds.

5. Install the Apache webserver with PHP support.

6. Restart the Apache service.

7. Download and install the Moodle application.

8. Create a required directory named moodledata.

9. Open your browser and enter the IP address of your web server plus /moodle

In our example, the following URL was entered into the Browser:



10. The web installation interface for Moodle should be displayed, Click the Next button after choosing the desired language.


11. Select the Improved MySQL (native/mysqli) and click on the Next button.

12. Enter the Database information required to connect to the Moodle database.

  • Database host: localhost
  • Database name: Moodle
  • Database user name: admin (Master name of rds)
  • Database password: huda82141 (Password as rds password)
  • Tables prefix: mdl_
  • Database port: (RDS Endpoint).


13. On the next screen, read the license agreement and click on the Next button.


Make sure all PHP requirements are met and click on the Continue button.


14. Wait for the moodle installation to finish and click on the Continue button.


  1. On the next screen, perform the following configuration:
  • Username – Enter the administrative user account name desired
  • Choose an authentication method – default
  • New password – Enter the administrative user password
  • First name – The administrator’s Name
  • Surname – The administrator’s Surname
  • email address – The administrator’s email address
  • Select a Country – The administrator’s country
  • Timezone – Select the desired timezone

Click on the Update Profile button.


Select the correct timezone, disable the self registration feature, and set an outgoing email address.


Click on the Save changes button to access the Moodle dashboard.


Congratulations! The Moodle installation was finished successfully.


There are numerous potentials for scale, file access, flexibility, and cost management while using Moodle in the cloud. Despite how helpful they may be, there will still be some difficulties to overcome.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Moodle, EC2 and I will get back to you quickly.

To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.


1. What database is used in Amazon RDS?

ANS: – There are roughly 200 tables in the Moodle database. Although Microsoft SQL Server or Oracle can also be used, MySQL or Postgres is the most common databases used by Moodle. For this reference architecture, the most widely used open-source relational database in the world, MySQL, was used. Scalable MySQL servers are deployed using Amazon RDS.

2. Which RDS database engines support multi-AZ deployment?

ANS: – To provide high availability and dependability, AWS RDS supports multi-AZ deployment. The following RDS database engine supports multi-AZ deployments: 

  • MariaDB 
  • MySQL 
  • Oracle 
  • PostgreSQL 


Huda is working as the Front-end Developer in Cloudthat Technologies. She is experienced in building and maintaining responsive websites. She is keen on learning about new and emerging technologies. In addition to her technical skills, she is a highly motivated and dedicated professional, committed to delivering high quality work.



    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!