Hosting ASP.NET Core web api with AWS Lambda – Truly serverless REST APIs

Click for: original source

In this article, we will learn about hosting ASP.NET Core Web API with AWS Lambda in a rather simple-to-follow manner. It is going to be as simple as developing a .NET 6 Web API as you would normally do using Controllers or Minimal APIs, and running some CLI commands which will deploy your API as Lambda Function to AWS Lambda super fast! By Mukesh Murugan.

The article provides a deep dive into serverless with dotnet:

  • Pros & cons of hosting ASP.NET Core Web API with AWS Lambda
  • When to Host ASP.NET Core Web API with AWS Lambda?
  • Prerequisites
  • Hosting ASP.NET Core Web API with AWS Lambda
    • Creating the .NET 6 Web API project
    • Installing the required Lambda package & service registration
    • Deploying the AWS Lambda with CLI
    • Lambda function URLs
    • Testing
    • Adding environment variables to the AWS Lambda
    • AWS Lambda CLI functions
    • Storing Lambda configurations in aws-lambda-tools-defaults.json
  • DevOps Enhancement for CI/CD

Being serverless, it costs nothing when there are no incoming requests, and also it costs close to nothing even when there are requests coming in, thanks to the generous Free Tier of AWS! Good read!

[Read More]

Tags bots apis programming learning cloud devops