Skip to content
This repository was archived by the owner on Jul 16, 2022. It is now read-only.

Upgrade Lambda Serverless ASP.NET Core Web API to .NET Core 2.2 with custom runtime #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaeldimoudis
Copy link
Owner

No description provided.

@attilah
Copy link

attilah commented May 13, 2019

When I tried to run .Net Core 3.0 Preview 5 I got TypeInitializationException about "System.Marvin". Did you try this given version?

@kevinjpetersen
Copy link

@attilah I'm getting the same error. Did you ever solve your issue?

@attilah
Copy link

attilah commented Jun 5, 2019

@kevinjpetersen no...I rolled back to 2.2. If you search for this error you can find some instances of it in the past and I did not want to go down the rabbit hole, I'll retry with the next release...

@michaeldimoudis
Copy link
Owner Author

There's a breaking change with .NET Core 3.0, more details can be found here aws/aws-lambda-dotnet#481

@vdesplanque
Copy link

Hi,

I try to implement what you did in this PR, but I'm not able to find "LambdaEntryPoint" class.
I added the NuGet package Amazon.Lambda.RuntimeSupport, with no luck.

Where can I find this type ?

Thank you,
Valentin

@michaeldimoudis
Copy link
Owner Author

Hi,

I try to implement what you did in this PR, but I'm not able to find "LambdaEntryPoint" class.
I added the NuGet package Amazon.Lambda.RuntimeSupport, with no luck.

Where can I find this type ?

Thank you,
Valentin

https://github.com/michaeldimoudis/aspnetcore-22-webapi-lambda-serverless/blob/master/AWSServerless1/LambdaEntryPoint.cs

@vdesplanque
Copy link

Hi,
I try to implement what you did in this PR, but I'm not able to find "LambdaEntryPoint" class.
I added the NuGet package Amazon.Lambda.RuntimeSupport, with no luck.
Where can I find this type ?
Thank you,
Valentin

https://github.com/michaeldimoudis/aspnetcore-22-webapi-lambda-serverless/blob/master/AWSServerless1/LambdaEntryPoint.cs

Ok, I thought it was some class embedded in AWS package.
I managed to publish my lambda to aws, but I ran in another problem :

"Runtime failed to start: fork/exec /var/task/bootstrap: permission denied"

Have you encountered this kind of problem ?

Valentin

@pprzybylski-metapack
Copy link

pprzybylski-metapack commented Sep 30, 2019

Hi, I'm getting the following error when tried to test lambda from this repository:

{
  "errorType": "NullReferenceException",
  "errorMessage": "Object reference not set to an instance of an object.",
  "stackTrace": [
    "at Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction.MarshallRequest(InvokeFeatures features, APIGatewayProxyRequest apiGatewayRequest, ILambdaContext lambdaContext)",
    "at Amazon.Lambda.AspNetCoreServer.AbstractAspNetCoreFunction`2.FunctionHandlerAsync(TREQUEST request, ILambdaContext lambdaContext)",
    "at Amazon.Lambda.RuntimeSupport.HandlerWrapper.<>c__DisplayClass25_0`2.<<GetHandlerWrapper>b__0>d.MoveNext()",
    "--- End of stack trace from previous location where exception was thrown ---",
    "at Amazon.Lambda.RuntimeSupport.LambdaBootstrap.InvokeOnceAsync()"
  ]
}

Could you give me some advice what is wrong in the lambda configuration or launching? I changed nothing in the code.

@michaeldimoudis
Copy link
Owner Author

An update to these samples, an ASP.NET Core 3.0 version PR is here #4 and blog post updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants