Cloud-hosted Moodle LMS on AWS

Overview

I designed and deployed a cloud-hosted Moodle Learning Management System (LMS) on AWS using Terraform. The project demonstrates how an educational institution or training organization can host an online learning platform in the cloud while separating the application and database layers and applying secure AWS networking practices.

Moodle runs on an Amazon EC2 instance using Ubuntu Linux, Apache, and PHP, while course, user, and application data are stored in an Amazon RDS MySQL database. The supporting AWS infrastructure including the VPC, public and private subnets, route tables, Internet Gateway, security groups, EC2 instance, and RDS resources was provisioned using Terraform.

After deployment, I configured Moodle and created a sample Introduction to Freelancing course to demonstrate the LMS from infrastructure provisioning through to the end-user learning experience.

Demo video

Watch the demo on YouTube

The demo covers the architecture, Terraform deployment, AWS resources, Moodle configuration, database connectivity, and the completed Introduction to Freelancing course.

Explore my code on GitHub !

Project Objectives

The primary goals of this project were to:

Architecture

The environment is deployed inside an AWS VPC with both public and private subnets across two Availability Zones.

The Moodle application runs on an Amazon EC2 instance located in a public subnet. The EC2 instance uses Ubuntu Linux with Apache and PHP to serve the Moodle application. 

Amazon RDS for MySQL provides the database layer and is deployed within private database subnets, preventing direct public access.

Users access Moodle over HTTP through the Internet Gateway. When Moodle requires application data, the EC2 instance communicates with Amazon RDS over MySQL port 3306.

Security groups control communication between the different components. HTTP traffic is permitted to the web server, SSH administration is restricted to an authorized IP address, and the RDS security group accepts MySQL traffic only from the EC2 web server security group.

AWS Services & Technologies

Cloud Infrastructure

Infrastructure & Administration

Application Stack

Infrastructure as Code

Rather than manually creating the AWS environment through the AWS Management Console, I used Terraform to provision the infrastructure.

The Terraform configuration creates and manages resources including:

This makes the environment repeatable, reusable, and easier to deploy or tear down when it is no longer required.

Application Deployment

After Terraform provisioned the infrastructure, the EC2 instance was configured to host Moodle.

The deployment process included:

Skills demonstrated

Lessons Learned

This project reinforced several important cloud engineering concepts.

Back to portfolio