Unable to upload Media Files on my kobotoolbox server

I have installed KoboToolBox on aws EC2 instance.
When I am creating a form and uploading media file (csv or image) I am getting error message “Could not upload your media”. The server is returning “500 Internal server error” message.

How to trace the error and resolve it?

Thanks & Regards,