Run your ASP.NET Minimal API on AWS Lambda in 10 minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

ความคิดเห็น • 8

  • @bo44arov
    @bo44arov ปีที่แล้ว +2

    thanks for this tutorial! really useful!

  • @markcoleman8579
    @markcoleman8579 ปีที่แล้ว +4

    Great video James. Any chance you can increase the font size in future videos so that they're easier to view on a tablet?

    • @serverlessjames
      @serverlessjames  ปีที่แล้ว

      Yes, absolutely. That's great feedback thanks Mark 👍

  • @hki6mq
    @hki6mq ปีที่แล้ว

    Hey James, any advice on how to deploy this using CDK?

    • @serverlessjames
      @serverlessjames  ปีที่แล้ว +1

      There's a great blog post on the AWS blogs that talk through how to deploy .NET with the CDK ☺️
      aws.amazon.com/blogs/modernizing-with-aws/build-package-publish-dotnet-csharp-lambda-functions-aws-cdk/

  • @stavvers
    @stavvers ปีที่แล้ว

    Hey James, great video. Question, I have done everything apart from set up a proxy. When I try to access the weatherforecast route I get a 404 and the following error when invoking from visual studio
    {
    "errorType": "NullReferenceException",
    "errorMessage": "Object reference not set to an instance of an object.",
    "stackTrace": [
    "at Amazon.Lambda.AspNetCoreServer.APIGatewayHttpApiV2ProxyFunction.MarshallRequest(InvokeFeatures features, APIGatewayHttpApiV2ProxyRequest apiGatewayRequest, ILambdaContext lambdaContext)",
    "at Amazon.Lambda.AspNetCoreServer.AbstractAspNetCoreFunction`2.FunctionHandlerAsync(TREQUEST request, ILambdaContext lambdaContext)",
    "at Amazon.Lambda.RuntimeSupport.HandlerWrapper.c__DisplayClass26_0`2.d.MoveNext()",
    "--- End of stack trace from previous location ---",
    "at Amazon.Lambda.RuntimeSupport.LambdaBootstrap.InvokeOnceAsync(CancellationToken cancellationToken)"
    ]
    }
    Is this due to the proxy not being set up?

    • @serverlessjames
      @serverlessjames  ปีที่แล้ว +1

      Great question Andy! What exactly are you passing as the input payload when you're invoking the function from Visual Studio? Under the hood, the AWS tooling is translating what it's expecting to be an API Gateway input payload into a request it can pass to ASP.NET (that's what the marshall request method does).
      If you invoke the function with say, a string of 'Hello World' that deseriailzed object will be null, causing an object reference error.
      If you @ me on twitter I can send a quick video