I have migrated by Codeigniter based PHP/MySQL application from GoDaddy to AWS EC2 and spent several days to resolve the following error.
I had PHP 5.3 by default but had to upgrade to PHP 5.6 in order to get CodeIgniter 3.X to work effectively.
Assuming that you have already created your AWS account and launched your EC2 instance using the console, following command will help you to configure/install PHP and MYSQL on the environment.
You can use Mac terminal to upload a file but I was struggling to find a way to upload folder from my Mac to AWS EC2.
I restarted my EC2 console through the AWS app and tried to access my DNS link but the browser threw an error.