Skip to content
This repository was archived by the owner on Sep 24, 2024. It is now read-only.

hannahchan/Serverless.WebApi

Repository files navigation

Serverless.WebApi

Serverless.WebApi is an experiment in deploying an ASP.NET Core WebApi as a serverless application to AWS Lambda. It is intended to be used as an example for learning purposes.

Prerequisites

You can quickly install the AWS Extensions for .NET CLI for this project by running;

dotnet tool restore

How this works

In short a package, Amazon.Lambda.AspNetCoreServer is installed in the WebApi project and a separate application entry point using this package, LambdaEntryPoint.cs is created for AWS Lambda. AWS Lambda uses this entry point to your application instead of the conventional Program.cs. The WebApi is configured and deployed as a serverless application by using a AWS Serverless Application Model (SAM) template.

Deploying the WebApi as a Serverless Application

Change into the project directory of the WebApi and run;

dotnet lambda deploy-serverless

By default this command reads values provided in the file aws-lambda-tools-defaults.json. If there are any required values that are missing, you will be prompted for them.

More Resources

About

A serverless experiment using AWS Lambda and ASP.NET Core.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages