Finally found the solution after searching the net... The issue was file size
I am on php 7 and Apache. So the configuration needs to changed at two places
upload_max_filesize = 25M post_max_size = 25M max_execution_time = 300 max_input_time = 300 memory_limit = 128M
sudo nano /etc/php/7.0/fpm/php.ini sudo nano /etc/php/7.0/apache2/php.ini
Apparently the settings needs to be changed for PHP AND Apache on Amazon AWS. Hope it helps others.