I was finally able to overcome my issues.
- cd into .csproj folder
dotnet lambda package using dotnet lambda tools
dotnet tool install -g Amazon.Lambda.Tools
- Assuming the rest of your serverless.ymal is set up correctly, make sure your serverless.yml has a package property with an artifact that points to the .zip file generated by dotnet lambda package, for example:
- You need a Lambda Entry Point class (e.g. LambdaEntryPoint.cs) that uses a Startup class:
public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
protected override void Init(IWebHostBuilder builder)
public class Startup
private readonly IConfiguration _configuration;
public Startup(IConfiguration configuration)
_configuration = configuration;
// This method gets called by the runtime. Use this method to add services to the container
public void ConfigureServices(IServiceCollection services)
/// This method gets called by the runtime. Use this method to configure the HTTP request pipeline
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
Note: some of this can be generated from templates.
- do a regular
Outside of what is readily available on the Internet, these steps highlight some of the hurdles I had to overcome to get mine working.