Create Ubuntu Server on AWS

  1. Access the EC2 service management console
  • Click Instances.
  • Click Launch instances.

Name the instance “moodle-training-server”

  1. On the Step 1: Choose an Amazon Machine Image (AMI) page:
  • Click Browse more AMIs to search for Ubuntu Server 22.04 LTS (HVM), SSD Volume Type.

EC2

  1. On the Step 2: Choose an Instance Type page:
  • Select instance type t3.small or t3.micro.
  • Click Create new key pair, name it moodle-key -> choose .pem format.
  • After creating the key pair, AWS will automatically download the moodle-key.pem file.
  • Save the file in a safe place (your personal computer).
  • In Network Setting, select Allow SSH traffic from.

EC2

  1. Launch the Instance
  • Click Launch Instance
  • Wait 1 - 2 minutes for the instance to be ready.
  • Click on instance name -> note down the Instance ID and Public IPv4 address.

EC2

  1. Assign a static IP (Elastic IP).
  • Go to EC2 > Network & Security > Elastic IPs.
  • Click Allocate Elastic IP → Allocate
  • Select Actions > Associate Elastic IP → Assign to instance moodle-training-server
  • Note down the Elastic IP: e.g. 54.255.26.77

EC2

  1. SSH into the server from your personal computer.
  • Open Terminal / CMD or PowerShell as administrator.
  • Paste the command ssh -i “C:\Users\yourname\Downloads\moodle-key.pem” ubuntu@EC2-PUBLIC-IP.
  • Replace the path to moodle-key.pem and the Public IPv4 Address you noted, then press Enter.

EC2

  1. Once connected successfully, you will see the message Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-1029-aws x86_64).

EC2

Next, we will install the Webserver to deploy the system