{ await conte" /> { await conte" /> { await conte"/>

.NET 6 Lambda Cold Start

124 Views Asked by At

i have a .net 6 serverless api running on aws lambda, and the cold start times for this endpoint:

endpoints.MapGet("/",
            async context =>
            {
                await context.Response.WriteAsync("Welcome to running ASP.NET Core on AWS Lambda");
            });

is from 5-8 seconds, but running it warm is only 90 ms..

what i dont understand is that the initialization time is only 700ms, but the invocation time is always over 5 seconds. here is the logs for the cold start: cold start logs warm logs: warm start logs

there's clearly something that runs after my startup.cs class, but before my custom auth is started, during a cold start that's taking up a lot of time, but i cant figure out what. do i just have to make it where it has no cold starts, or can i fix the coldstart time?? i really dont understand what's happening here any help is appreciated.

more logs insights

0

There are 0 best solutions below