I have created the NET 6 service using AWS SDK Template. It works fine in Windows. I have deployed it to AWS Lambda. It starts ok, It should show Swagger UI but I see logs with an unknown error:
2023-03-01T16:31:11.189+01:00 INIT_START Runtime Version: dotnet:6.v13 Runtime Version ARN: arn:aws:lambda:eu-central-1::runtime:699f346a05dae24c58c45790bc4089f252bf17dae3997e79b17d939a288aa1ec
2023-03-01T16:31:12.074+01:00 2023-03-01T15:31:12.063Z [Information] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down.
2023-03-01T16:31:12.076+01:00 2023-03-01T15:31:12.075Z [Information] Microsoft.Hosting.Lifetime: Hosting environment: Production
2023-03-01T16:31:12.076+01:00 2023-03-01T15:31:12.076Z [Information] Microsoft.Hosting.Lifetime: Content root path: /var/task
2023-03-01T16:31:12.159+01:00 START RequestId: c497c0cb-a7e7-49e3-b289-f924b17fd4ab Version: $LATEST
2023-03-01T16:31:12.451+01:00
Copy
2023-03-01T15:31:12.450Z c497c0cb-a7e7-49e3-b289-f924b17fd4ab fail System.NullReferenceException: Object reference not set to an instance of an object.
2023-03-01T15:31:12.450Z c497c0cb-a7e7-49e3-b289-f924b17fd4ab fail System.NullReferenceException: Object reference not set to an instance of an object.
What should I check and how to fix it?