ASP NET Core on AWS Lambda | .NET ON AWS | AWS Serverless | Amazon

  Рет қаралды 13,558

Rahul Nath

Rahul Nath

Күн бұрын

AWS Lambda is a compute service that lets you run code without provisioning or managing servers. You can combine Lambda Function with API Gateways or Function URLs to build API endpoints.
But what if you have existing APIs built using ASP NET Web API and want to use the AWS Lambda function. You might not want to go through all the work to migrate them over to independent Lambda functions and build the API from scratch.
In this video, I will show you how you can easily host ASP Net Web APIs on Lambda Functions. I will show how to expose ASP NET API using the Function URLs feature of AWS Lambda. We will also explore how we can integrate it directly with API Gateway as a REST API and also as an HTTP API.
00:00 Introduction
01:22 ASP.NET Core API
02:25 Minimal API endpoint
03:26 Enable Lambda Hosting
06:58 Testing Local Dev
07:11 Deploying into AWS Lambda
10:10 Enabling Function URL
11:35 Enable Swagger Endpoint
12:42 Deploy From Visual Studio
14:49 API Gateway - HTTP API
17:30 API Gateway - REST API
20:54 Conclusion
Additional Watching
📹Function URLs - • AWS Lambda - FUNCTION ...
📹AWS Lambda - • AWS LAMBDA For The .NE...
📹Lambda Udemy Course - bit.ly/aws-lambda-udemy
📹 AWS HTTP API - • Amazon API GATEWAY - H...
📹 AWS REST API - • Amazon API GATEWAY - I...
📹 ASP Series - bit.ly/asp-net-core-series
📹AWS Series - bit.ly/aws-net-series
Come say hi! ✋
🌍 Blog - rahulpnath.com/
✉ Subscribe to my Newsletter - www.rahulpnath.com/subscribe
🐦Twitter - / rahulpnath
📸Instagram - / rahulpnath
🛠️ Uses rahulpnath.com/uses
🎥 Recording Setup and Workflow - www.rahulpnath.com/blog/youtu...

Пікірлер: 44
@psyduk17
@psyduk17 3 ай бұрын
Excellent, Thanks friend
@Kspvilar
@Kspvilar Жыл бұрын
Great Content as allways! Thank you.
@RahulNath
@RahulNath Жыл бұрын
Glad you enjoyed it Knulp!
@2784raj
@2784raj Жыл бұрын
you are doing awesome work to help IT community, by making such a amainzing content thanks you so much!
@RahulNath
@RahulNath Жыл бұрын
Thank you Raj! Glad you are liking the videos.
@kebab-case
@kebab-case 3 ай бұрын
Thank you very much, you are good at explaining!
@RahulNath
@RahulNath 3 ай бұрын
You are welcome! Hope you are enjoying the AWS Series bit.ly/aws-net-series
@DguruZ
@DguruZ Жыл бұрын
Awesome tutorial sr. Thank you so much
@RahulNath
@RahulNath Жыл бұрын
Glad you liked it! Hope you are liking the Series bit.ly/aws-net-series
@TonoNamnum
@TonoNamnum Жыл бұрын
Very cool!
@RahulNath
@RahulNath Жыл бұрын
Thank you Antonio! 😀
@sivakumarr28
@sivakumarr28 Жыл бұрын
If I found this video a year before, I can save lot of time. I host a webapi project in lambda a year ago..
@RahulNath
@RahulNath Жыл бұрын
Yeah I am late with this guess 😂
@0xfatherstreet
@0xfatherstreet 3 ай бұрын
Thank you
@danieltoledo9603
@danieltoledo9603 11 ай бұрын
the best!
@RahulNath
@RahulNath 11 ай бұрын
So kind of you Daniel and glad you like it.
@shortanimatedmovie672
@shortanimatedmovie672 Ай бұрын
Anyone can help me with this error after this command {Enter Runtime: (The runtime environment for the Lambda function) dotnet8} : error : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json.
@emilmuller4261
@emilmuller4261 Жыл бұрын
Excellent as always!🎉 what about content files for front end?
@hector9079
@hector9079 Жыл бұрын
Muy bueno
@RahulNath
@RahulNath Жыл бұрын
Thank you hector!
@vivekgowda1576
@vivekgowda1576 3 ай бұрын
Thank you for the video. What if we use a clean architect or large application, is this the best way to do it? Or can we create a lambda function for each API controller level? As per my understanding, Lambda should be light. if we deploy a complete solution as a single lambda fiction it will cause performance issues.
@hassansiddique2936
@hassansiddique2936 Жыл бұрын
so we don't need to buy any hosting for webspi. is there any limitations to host on lamda?
@shenanigans917
@shenanigans917 Жыл бұрын
You sir have earned a subscriber!!! Is there any possibility you could show how to add functionality within the REST API for something like a shopping cart application in the future?
@RahulNath
@RahulNath 11 ай бұрын
Glad you like the content. Can you provide more details on what you are looking to achieve. Hopefully I will do a video on that
@bettyyuliani650
@bettyyuliani650 Жыл бұрын
what's the difference between connecting the lambda to api gateway to no connection? when it works without the api gateway that you introduced in the later part of the video?
@RahulNath
@RahulNath Жыл бұрын
API Gateway provides more out of the box capabilities when building APIs. So if you want to use that while exposing on Lambda you can choose that option. There is a video on API Gateway in this series here bit.ly/aws-net-series. Let me know if that helps.
@ajaychourasia5910
@ajaychourasia5910 Жыл бұрын
Thank you so much for sharing. Can you please show how to create Function URL for any REST web api in the same project as you are showing in the video. Thanks!
@RahulNath
@RahulNath Жыл бұрын
Hey Ajay Glad you like the video. I do have two other videos on Function URLs in this series bit.ly/aws-net-series Did you get a chance to see those? What trouble are you running into?
@ajaychourasia5910
@ajaychourasia5910 Жыл бұрын
@@RahulNath thank you for your reply. I watched your other video of URL and I followed the same steps and and made auth to NONE, even then my Function URL is returning 'Internal server error' where as if I am using the URL which I got in the Visual Studio after deployment is working perfectly fine, not sure where I am missing some thing. Thanks.
@Mec2005
@Mec2005 10 ай бұрын
Thanks for the content. I have an aspnet 6 webapi with many CRUDs, if I use lambda to host it, could I get error if call an endpoint that takes 2 minutes to do something (in a db transaction) but my lambda is ending, i.e, 15 minutes is the max time, after that he dies and my suppose transaction dies to. If I call my endpoint first time, the lambda will lives for 15 minutes (max that I cofigured) or it will die and for each calls it will starting again?
@RahulNath
@RahulNath 10 ай бұрын
Not sure if I fully understand the question, but maybing check out this post/video on Lambda Lifecycle might help you understand this better www.rahulpnath.com/blog/lambda-lifecycle-and-net/ If not can you explain your scenario in more details.
@PrinceYadav-fn3cx
@PrinceYadav-fn3cx Жыл бұрын
Hi can you tell me how I can check implementation of inbuilt method is there any extensions available in visual studio?
@RahulNath
@RahulNath Жыл бұрын
I have Resharper which helps with that. Not sure if there is a way out of the box with VS. Or I use Rider which also does a good job with it.
@PrinceYadav-fn3cx
@PrinceYadav-fn3cx Жыл бұрын
@@RahulNath thank you..
@pajohns
@pajohns 11 ай бұрын
Isn't the idea of lambda functions to keep the functions tiny where endpoints are split up into separate lambda functions? From what I understand of this video this lambda function is actually a monolithic application.
@RahulNath
@RahulNath 10 ай бұрын
It always doesn't have to be separate endpoints. You can have a domain aggregarte API in a single endpoint. Also boils down to how you want to scale the functions etc as well. I wouldn't recomment having the entire application on it - but yes that is also a possibliity and comes down to the use case. Hope that helps.
@saifmohsen8312
@saifmohsen8312 11 ай бұрын
very good vid, thnx, but what about the database ? how can we host and connect it ?
@RahulNath
@RahulNath 11 ай бұрын
What database are you using? I would either use a cloud hosted on like DynamoDB, SQL on RDS etc or self host it. What are you trying to achieve?
@user-qg6kv9nd1h
@user-qg6kv9nd1h 4 ай бұрын
I am Getting this Error please help! In particular it says IAM is not authorized to perform iam:ListRoles nor iam:ListPolicies.
@RahulNath
@RahulNath 4 ай бұрын
Looks like a permission issue Nishant. For whatever action you are trying to do on the AWS resource you need that permission. Not sure what exactly the code is doing in your case.
@jj39065
@jj39065 Жыл бұрын
You are missing some important steps I guess. First I get Error retrieving configuration for function apixxxxxx Unable to get IAM security credentials from EC2 and second I dont get Publish to AWS even after the Lambda is added.
@RahulNath
@RahulNath Жыл бұрын
Hey Julian, How are you running the application? In the demo I am running it on my local machine and not an EC2 instance. Not sure why you are getting the IAM security error related to EC2. Also do you have the AWS Toolkit setup and the local credentials set up? I talk about this here www.rahulpnath.com/blog/amazon-credentials-dotnet/
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 11 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 17 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 6 МЛН
C# (.NET 6) on Lambda with Multiple Handler, API Gateways
1:02:23
Dot Net Learners House
Рет қаралды 3,4 М.
AWS API Gateway to Lambda Tutorial in Python | Build a REST API
11:17
Be A Better Dev
Рет қаралды 335 М.
Hangfire - Hangfire in .Net Core | Hangfire Asp.Net Core
16:17
Coding Droplets
Рет қаралды 21 М.
The Easiest Way to Create Serverless APIs in .NET
18:14
Nick Chapsas
Рет қаралды 40 М.
Love conquers all rules?
0:26
Den Do It
Рет қаралды 6 МЛН
Вот так и помогай людям … #корейскоекафе #корейцы
0:19
CHICKO — Вкус Кореи
Рет қаралды 4,2 МЛН
Ném bóng coca-cola😂😂😂
0:35
Tippi Kids TV
Рет қаралды 34 МЛН
О, бабушка, дай конфетку! (Кремлина микс)
0:44
А на даче жизнь иначе!
Рет қаралды 5 МЛН