Тёмный
No video :(

.NET 7 on AWS Lambda with NativeAOT 

James Eastham
Подписаться 3,9 тыс.
Просмотров 3,1 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@zacky7862
@zacky7862 Год назад
Great explanation about NativeAOT. This is very helpful
@serverlessjames
@serverlessjames Год назад
Glad you found it useful 🙂👍
@NickTurpchinoff
@NickTurpchinoff Год назад
Can you do this with the .NET Minimal APIs?
@serverlessjames
@serverlessjames Год назад
You will be able to shortly, yes. I've got an open PR in the Lambda tooling to enable it. I've done some tests with a local build of the libraries though, and it's looking fast 🔥
@balaclavacph1880
@balaclavacph1880 Год назад
Thanks for good video. Is it possible to have AOT with Lambda Function Url´s?
@serverlessjames
@serverlessjames Год назад
Yes, absolutely. The format of the input event will match the API Gateway HTTP API request. If you follow the instructions on Bryan's blog to build to function, and then these instructions for native AOT you'll be in the right place. nodogmablog.bryanhogan.net/2022/08/simple-lambda-function-with-a-function-url/
@balaclavacph1880
@balaclavacph1880 Год назад
@@serverlessjames Thank you! It would be awesome to get EF Core compatible/with trimmed friendly code for AOT. Hoping it will be possible in .Net 8. Any idea if there is a AOT friendly ORM for .Net out there.. That would be awsome!
@serverlessjames
@serverlessjames Год назад
@@balaclavacph1880 there is an open issue on GitHub tracking the EF Core support. Fingers crossed.
@joancomasfdz
@joancomasfdz Год назад
How do you debug it locally in Visual Studio 2022?
@serverlessjames
@serverlessjames Год назад
This is a great idea for another video 🎉 I do have a video on my channel on Unit Testing with Lambda. My normal debugging approach is to run my unit tests in debug mode and step through my function code that way.
@michaelakin766
@michaelakin766 Год назад
@@serverlessjames I just installed the templates, tried to run this through debug and I get "System.UriFormatException: 'Invalid URI: The hostname could not be parsed.'" Any ideas on how to get this to debug locally?
@YTN3rd
@YTN3rd Год назад
Those benchmark numbers have been updated and they are now roughly on par with NET 6 for NET 7 AOT 😢
@serverlessjames
@serverlessjames Год назад
Compared to the .NET 6 managed runtime the P50 cold start execution is 70% (778ms to 372ms) faster and the P99 86% (1470ms to 581ms) faster. Once warm the difference is about 10%. Compared to .NET 6 native AOT then yeah the numbers are pretty similar.
@fatoven4127
@fatoven4127 Год назад
Awesome video. Have you seen an error like this when deploying? dotnet\sdk\7.0.100\Sdks\Microsoft.DotNet.ILCompiler\build\Microsoft.NETCore.Native.Publish.targets(58,5): error : Cross-OS native compilation is not supported.
@ianknowles
@ianknowles Год назад
I'm getting the same. Docker isn't firing up and been searching round but no answers as of yet...
@serverlessjames
@serverlessjames Год назад
Yep, what OS are you compiling on? It might also be worth looking at a later video that covers the SAM tooling which simplifies a lot of this work. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-n21p5Ezlx28.html
@ianknowles
@ianknowles Год назад
@@serverlessjames Ah cheers James I actually watch that video aswell and decided to give the SAM cli a try. Funnily enough after installing that the dotnet tools started working. On windows. Do you work directly for AWS. I have a couple of clients one of which at the moment are having a major reshuffle and rebuild of their system. We had a beautifully orchestrated micro-service system that was just getting hit hard between cold start and connecting to DocDB. As POC built a few bits in rust on Grav but there predominantly .NET so I was quite excited when Native AOT templates were announced.
@serverlessjames
@serverlessjames Год назад
@@ianknowles yeah, it could have been an outdated version of the tooling or something like that ☺️ Yes, I do work for AWS. what kind of cold starts are you seeing?
@ianknowles
@ianknowles Год назад
@@serverlessjames Possibly outdated but I did run the tools installer as prompted then templates shown up in VS. As for the cold starts 1.3-2.0 seconds on lambda execution .NET 6 (ready-to-run) with the usual AWS Core, Dynamo, EvBr and S3 clients. DocDB first connection taking a similiar amount of time to connect with the mongodb client. But when your 4 levels of invocation deep those delays compound heavily. A lot of the first requests were taking upto 30s and timing out (sub second on subsequent requests). So we opted to role 8 UX related lambdas into one monolyth so they could share connection. May have to move to something like ELK as we need full text search and regex on mongo style filter is underwhelming if your across more than 10k documents but if you have any ideas on how to remedy then all ears. PS I suspect your reasonably local south of manchester?
Далее
.NET 7 native AOT with AWS SAM
11:31
Просмотров 1,1 тыс.
C’est qui le plus fort 😂
00:18
Просмотров 6 млн
I think I was wrong about AWS Amplify
30:39
Просмотров 58 тыс.
The Logging Everyone Should Be Using in .NET
15:34
Просмотров 61 тыс.
The Greenwich Meridian is in the wrong place
25:07
Просмотров 834 тыс.
It's time for change, it's time for Linux.
10:53
Просмотров 225 тыс.
When RESTful architecture isn't enough...
21:02
Просмотров 272 тыс.