title: AWS - Serverless - "message": "Internal server error" when deploying, but work offline
body: <p>I have a problem when deploying a project using Serverless framework and Amazon Web Services (more specifically API Gateway service).</p>
  
  <p>On my local machine, when I do <code>serverless offline</code> everything works fine:
  When going to <code>http://localhost:3000/</code>, I have:</p>
  
  <pre><code>{
      "message": "welcome"
  }
  </code></pre>
  
  <p>When navigating to <code>http://localhost:3000/examples</code>, I have:</p>
  
  <pre><code>{
      "message": "Example test"
  }
  </code></pre>
  
  <p>However, when deploying with <code>serverless deploy</code>, only the first one works. The next one displays the following:</p>
  
  <pre><code>{
      "message": "Internal server error"
  }
  </code></pre>
  
  <p>In my code I have the following routes:</p>
  
  <pre><code>app.use('/examples', ExampleController)
  
  app.get('/', (request, response) =&gt; {
    response.json({
      message: 'welcome'
    })
  })
  </code></pre>
  
  <p>And this is what I have in my ExampleController:</p>
  
  <pre><code>ExampleController.get('/', (request, response) =&gt; {
    response.json({
      message: 'Example test'
    })
  })
  </code></pre>
  
  <p>What can be the problem here?</p>