.NET Core 3.1 + AWS Lambda - Deploy a .NET Core API and SQL Server DB to Lambda and RDS



How to setup an AWS environment from scratch and deploy a .NET Core 3.1 API to AWS Lambda that connects to a SQL Server database running on AWS RDS (Relational Database Service) and sends email using AWS SES (Amazon Simple Email Service).

TUTORIAL:

VIDEO SECTIONS
1:15 Create AWS VPC (Virtual Private Cloud)
3:06 Create AWS Subnets
6:20 Create AWS Internet Gateway (IGW)
6:52 Create AWS NAT Gateway
7:40 Configure VPC Route Tables
10:10 Configure VPC Security Group
11:19 Create SQL Server Database Instance in AWS RDS
14:13 Configure Email in AWS SES
18:28 Create AWS Lambda Function
20:54 Create HTTP API in AWS API Gateway
22:20 Download and Update .NET Core API to run on AWS Lambda
29:59 Deploy .NET Core API to Lambda
32:54 Test .NET Core API with Postman

SUBSCRIBE TO SEE MORE:

BLOG:
TWITTER:
GITHUB:

#dotnet #aspnetcore #awslambda

source

13 thoughts on “.NET Core 3.1 + AWS Lambda – Deploy a .NET Core API and SQL Server DB to Lambda and RDS”
  1. So as far as I understand, I must put the lambda function in a private subnet in the VPC. and so to gain internet access I must have a NAT Gateway witch is not included in the free tier.

    is that really what's happening and AWS are robbing low-budget people in a "legal gentle way" or I am just dumb and have misunderstood something??

  2. I am sure I've done everything right. I even double-checked everything, yet when I send a request to any route I get an "Internal server error" Message!!

    I am about to take the fucking machine and crash it into 100000 pieces. IDK what to do, it's been already 3 days since I started trying to make this shit work…

    SOMEONE, PLEASE KILL ME!

    DEAR GOD, I DO NOT WANT THIS LIFE ANYMORE, THIS AWS THING IS GOING TO GIVE ME A HEART ATTACK ANYWAY.

  3. This was a really useful video and it finally helped me deploy my web api. The only issue I have is I can't enable xml comments for my Swagger UI. Do you know how to fix this issue?

    This is the code I hade to comment out with using AWS Lambda (It works locally):

    private void InitialiseXmlDocumentation()

    {

    var xmlCommentFileName = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";

    var xmlCommentsFullPath = Path.Combine(AppContext.BaseDirectory, xmlCommentFileName);

    swaggerGenOptions.IncludeXmlComments(xmlCommentsFullPath);

    }

  4. Hi Jason,

    I have a question about using Lambda with RDS MSSQL.

    When under heavy load, Lambda can spawn many thousands of concurrent functions, and all of them will try to establish a connection to the DB instance.

    This will create a bottleneck for DB. What is your opinion or solution for this?

Leave a Reply

Your email address will not be published.

Captcha loading...