Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does lambda support asp.net core 6? Does documentation need updating? #1107

Closed
SamuelCox opened this issue Mar 8, 2022 · 7 comments
Closed
Labels
doc-readme documentation This is a problem with documentation. module/aspnetcore-support p1 This is a high priority issue queued

Comments

@SamuelCox
Copy link

The Question

I have tried to update an asp.net core 3.1 lambda to .net 6, and unfortunately following aws' documentation the lambda fails to start, giving me 502 bad gateway.

The official docs just say to upgrade to Amazon.Lambda.* 7.0.1, and this readme: https://github.com/aws/aws-lambda-dotnet/blob/ba7a655f8c316bdd078ef8b0db6b1746c61584e3/Libraries/src/Amazon.Lambda.AspNetCoreServer/README.md states nothing for .net 6

Logs:
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
284
2022-03-08T23:20:42.762+00:00
at LambdaEntryPoint..ctor()
285
2022-03-08T23:20:42.762+00:00
at Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction..ctor()
286
2022-03-08T23:20:42.762+00:00
at Amazon.Lambda.AspNetCoreServer.AbstractAspNetCoreFunction2..ctor(StartupMode startupMode) 287 2022-03-08T23:20:42.762+00:00 at Amazon.Lambda.AspNetCoreServer.AbstractAspNetCoreFunction2.Start()
288
2022-03-08T23:20:42.762+00:00
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Start(IHost host)

Environment

  • Build Version: Amazon.Lambda.* 7.0.1
  • OS Info: debian
  • Build Environment: dotnet lambda package
  • Targeted .NET Platform: .net 6 ReadyToRun

This is a ❓ general question

@SamuelCox SamuelCox added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Mar 8, 2022
@ashishdhingra
Copy link
Contributor

Hi @SamuelCox,

Good morning.

Thanks for posting guidance question. Could you please refer the blog post Introducing the .NET 6 runtime for AWS Lambda which has steps on migrating to .NET 6 and see if it helps.

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 9, 2022
@SamuelCox
Copy link
Author

Hi, as I mentioned, that document simply says to upgrade to Amazon.Lambda.* version 7.0.1. If that's all that's expected then the problem is on my side, that's fine.
But I'd again note that this https://github.com/aws/aws-lambda-dotnet/blob/ba7a655f8c316bdd078ef8b0db6b1746c61584e3/Libraries/src/Amazon.Lambda.AspNetCoreServer/README.md does not make any mention of .net 6. Would be good to get it updated.

@ashishdhingra ashishdhingra added doc-readme documentation This is a problem with documentation. and removed guidance Question that needs advice or information. labels Mar 9, 2022
@ashishdhingra
Copy link
Contributor

Hi, as I mentioned, that document simply says to upgrade to Amazon.Lambda.* version 7.0.1. If that's all that's expected then the problem is on my side, that's fine. But I'd again note that this https://github.com/aws/aws-lambda-dotnet/blob/ba7a655f8c316bdd078ef8b0db6b1746c61584e3/Libraries/src/Amazon.Lambda.AspNetCoreServer/README.md does not make any mention of .net 6. Would be good to get it updated.

@SamuelCox Yes, it would be good to get https://github.com/aws/aws-lambda-dotnet/blob/ba7a655f8c316bdd078ef8b0db6b1746c61584e3/Libraries/src/Amazon.Lambda.AspNetCoreServer/README.md updated for .NET 6.

@ashishdhingra ashishdhingra added the bug This issue is a bug. label Mar 9, 2022
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. label Mar 10, 2022
@ashishdhingra ashishdhingra removed the bug This issue is a bug. label Jul 7, 2022
@rahulpnath
Copy link

@ashishdhingra ashishdhingra added p1 This is a high priority issue queued labels Nov 4, 2022
@ashishdhingra
Copy link
Contributor

Per discussion with the team, we should document when to use minimal API and when Amazon.Lambda.AspNetCoreServer package.

Blog post Introducing the .NET 6 runtime for AWS Lambda on how to use minimal API.

@ashishdhingra
Copy link
Contributor

Fixed by PR #1784

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-readme documentation This is a problem with documentation. module/aspnetcore-support p1 This is a high priority issue queued
Projects
None yet
Development

No branches or pull requests

3 participants