AWS Lamda (NET 6): no reponse

0

I am developing AWS Lambda as NET 6 Web Service. The first version is simple, I run it, then try to query in browser: I expect Swagger page. But received {"message":"Internal Server Error"}

The CloudWatch contains logs: all my log messages from ConfigureServices, Configure but no Swagger page. One log record is at the end

Unable to bind to http://localhost:5000 on the IPv6 loopback interface: 'Address family not supported by protocol'.

May it be the reason of problem? if yes - how to fix it?

  • Can you share more information on what are you doing exactly to create your API?

    One useful example using the Amazon.Lambda.AspNetCoreServer.Hosting package to wire ASP.NET to Lambda: https://hbhhathorn.medium.com/how-to-deploy-asp-net-6-0-core-web-api-to-aws-lambda-easily-87fcfd8782a

  • I have created my project using AWS Serverless template in VS2022. And used your link to deploy it to AWS. The matter is: I have the 2nd login/pwd and the same project I have uploaded to other region. It works fine. The difference is in one string in appsettings. But anyway Swagger page should appear. Btw, I can upload my project here if it can help

  • Since you are saying the same code is working in a different lambda, it sounds like the issue is in the lambda configuration and not the code. Check to make sure that you have selected the correct runtime and architecture for your application. If that doesn't resolve the issue, please share the full code and SAM files. You can follow these steps to download the SAM file for the non-working function: https://disaster-recovery.workshop.aws/en/labs/basics/lambda.html

Oleg
asked 10 months ago86 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions