Study up!
https://docs.moodle.org/400/en/Amazon_EC2_Cloud_Services_Installation
but old and specific to Redhat/Fedora? based Linux ... hints/clues are:
"...time of writing 26-01-2012 ...) and use of 'yum' package manager for installing requirements for Moodle to run.
Here's one that is newer ...
https://knowledgeacademy.io/moodle-installation-and-configuration-on-amazon-ec2-instance/
appears to be "New released year 2020 Moodle version is 3.9."
You can find other hits:
https://www.google.com/search?client=&q=installing+moodle+on+AWS
'SoS', Ken