# Giraffe issue with ASP .NET Core 3.0 & AWS Lambda Custom Runtime

**URL:** <https://forums.fsharp.org/t/giraffe-issue-with-asp-net-core-3-0-aws-lambda-custom-runtime/1097>\
**Category:** General\
**Tags:** web\
**Created:** [November 22, 2019, 2:42am UTC](https://forums.fsharp.org/t/giraffe-issue-with-asp-net-core-3-0-aws-lambda-custom-runtime/1097 "2019-11-22T02:42:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bramford](https://avatars.discourse-cdn.com/v4/letter/b/3bc359/32.png) [@bramford](https://forums.fsharp.org/u/bramford)\
**Post date:** [November 22, 2019, 2:42am UTC](https://forums.fsharp.org/t/giraffe-issue-with-asp-net-core-3-0-aws-lambda-custom-runtime/1097/1 "2019-11-22T02:42:04Z")

</div>

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:

> **[.NET Core 3.0 on Lambda with AWS Lambda’s Custom Runtime | Amazon Web Services](https://aws.amazon.com/blogs/developer/net-core-3-0-on-lambda-with-aws-lambdas-custom-runtime/)**
>
> .NET Core 3.0 was recently released which brings in a host of new features and improvements. This release of .NET Core is called a “Current” release by the .NET team which means it will have a short lifecycle of support after the next release of .NET...

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:

> **[bramford/giraffe-aspnetcore3-lambda-customruntime-apigateway](https://github.com/bramford/giraffe-aspnetcore3-lambda-customruntime-apigateway)**
>
> Example of Giraffe application that should run on ASP.NET Core 3.0 Lambda Custom Runtime behind API Gateway - bramford/giraffe-aspnetcore3-lambda-customruntime-apigateway

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:

```auto
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).
