How to configure slm in amazon web service?

I tried to deploy an php slim on amazon web service elastic beanstalk but upon running the code i’m getting 500 internal server error. the code is working fine on localhost .can anybody tell me how to resolve the problem ?

Make sure your EC2 instance is running the proper version of PHP.

The default error handler is very basic. It sets the Response status code to 500. The default error handler can also include detailed error diagnostic information. To enable this you need to set the displayErrorDetails setting to true. Details.

$configuration = [
    'settings' => [
        'displayErrorDetails' => true,

Second option is to check the server error logfiles.