I’m attempting to use AWS Lambda Custom Runtime to run my ASP .NET Core 3.0 Giraffe API behind API Gateway (proxy mode)
According to the instructions here:
The Lambda entrypoint must now be part of the main
function.
I attempted to translate the entrypoint definition from C# to F# but I can’t seem to get the objects & typing right. See my code here:
The Func
delegate used for functionHandler
is confusing and although I’ve wrapped it anonymously for compatibility with lambdaEntry.FunctionHandlerAsync
, I can’t make the result compatible with any of the overrides that belong to HandlerWrapper.GetHandlerWrapper
.
There’s a simple ASP .NET 3.0 Lambda Custom Runtime template available:
dotnet new -i Amazon.Lambda.Templates
dotnet new lambda.CustomRuntimeFunction --name CustomRuntimeFunction
It’s not much help to me because I need to deal with with requests/responses through API Gateway (not strings).