title: Additional MVC Controller in AWS lambda ASP.NET Core
body: <p>I'm working with the ASP.NET core example project. To create the project run</p>
  
  <pre><code>dotnet new lambda.DynamoDBBlogAPI --profile default --region us-east-1
  </code></pre>
  
  <p>This creates two controllers by default. </p>
  
  <ul>
  <li>Controllers\S3ProxyController - Web API controller for proxying an S3 bucket</li>
  <li>Controllers\ValuesController - example Web API controller</li>
  </ul>
  
  <p>I'm trying to add an additional controller .. but I'm clearly missing something as the controller does not seem to register. </p>
  
  <p>If I simply add a class that looks like this to the Controllers folder. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>using System;
  using System.Collections.Generic;
  using System.Text;
  using Microsoft.AspNetCore.Mvc;
  
  namespace FriendHelper.Controllers
  {
      [Route("api/animals")]
      class AnimalController : Controller
      {
          [HttpGet]
          public IEnumerable&lt;string&gt; Get()
          {
              return new string[] { "Lion", "Tiger" };
          }
  
      }
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>This doesn't seem to register, so going to <a href="http://localhost:5000/api/animals" rel="nofollow noreferrer">http://localhost:5000/api/animals</a> simply returns a 404 </p>
  
  <p>I don't have much experience with ASP.NET MVC so I'm sure there's something silly I'm missing but I can't see where these other controllers are registered.</p>