Goa.Functions.ApiGateway 0.8.0-preview

This is a prerelease version of Goa.Functions.ApiGateway.
dotnet add package Goa.Functions.ApiGateway --version 0.8.0-preview
                    
NuGet\Install-Package Goa.Functions.ApiGateway -Version 0.8.0-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Goa.Functions.ApiGateway" Version="0.8.0-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Goa.Functions.ApiGateway" Version="0.8.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="Goa.Functions.ApiGateway" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Goa.Functions.ApiGateway --version 0.8.0-preview
                    
#r "nuget: Goa.Functions.ApiGateway, 0.8.0-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Goa.Functions.ApiGateway@0.8.0-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Goa.Functions.ApiGateway&version=0.8.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goa.Functions.ApiGateway&version=0.8.0-preview&prerelease
                    
Install as a Cake Tool

Goa.Functions.ApiGateway

Build high-performance AWS Lambda functions with ASP.NET Core integration for API Gateway HTTP/REST APIs. This package provides seamless integration between AWS API Gateway and ASP.NET Core, supporting both V1 and V2 payload formats with native AOT compilation for optimal cold start performance.

Quick Start

dotnet new install Goa.Templates
dotnet new goa.apigw -n "MyApiFunction"

Features

  • ASP.NET Core Integration: Full support for ASP.NET Core middleware, routing, and endpoints
  • Multiple API Gateway Types: Support for HTTP API V2, HTTP API V1, and REST API formats
  • Native AOT Ready: Optimized for ahead-of-time compilation with minimal cold starts
  • High Performance: Pre-compiled serialization contexts and optimized request/response handling
  • OpenAPI Support: Optional OpenAPI/Swagger integration with Scalar UI
  • Flexible Routing: Standard ASP.NET Core routing with full endpoint mapping capabilities
  • Authentication Support: Built-in support for JWT, IAM, and custom authorizers
  • Minimal Boilerplate: Simple, functional-style configuration with sensible defaults

Basic Usage

using Goa.Functions.ApiGateway;
using Goa.Functions.Core;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.Text.Json;
using System.Text.Json.Serialization;

await Host.CreateDefaultBuilder()
    .UseLambdaLifecycle()
    .ForAspNetCore(app =>
    {
        app.UseRouting();
        app.UseEndpoints(endpoints =>
        {
            endpoints.MapGet("/hello", () => "Hello from Lambda!");
            endpoints.MapPost("/users", async (User user, HttpContext context) => 
            {
                context.Response.StatusCode = 201;
                context.Response.Headers.Location = $"/users/{user.Id}";
                await JsonSerializer.SerializeAsync(context.Response.Body, user, AppJsonContext.Default.User);
            });
        });
    }, apiGatewayType: ApiGatewayType.HttpV2)
    .WithServices(services =>
    {
        services.ConfigureHttpJsonOptions(options =>
        {
            options.SerializerOptions.TypeInfoResolver = AppJsonContext.Default;
        });
    })
    .RunAsync();

public record User(int Id, string Name);

[JsonSourceGenerationOptions(WriteIndented = false)]
[JsonSerializable(typeof(User))]
public partial class AppJsonContext : JsonSerializerContext;

Documentation

For more information and examples, visit the main Goa documentation.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0-preview 307 3/17/2026
0.7.8-preview 105 3/3/2026
0.7.7-preview 63 3/3/2026
0.7.6-preview 63 3/3/2026
0.7.5-preview 75 3/2/2026
0.7.4-preview 71 3/1/2026
0.7.3-preview 77 2/28/2026
0.7.2-preview 92 2/23/2026
0.7.1-preview 134 1/26/2026
0.7.0-preview 78 1/26/2026
0.2.1-preview 99 1/20/2026
0.2.0-preview 112 1/14/2026
0.1.9-preview 106 1/1/2026
0.1.8-preview 265 12/15/2025
0.1.7-preview 227 12/15/2025
0.1.6-preview 216 12/15/2025
0.1.5-preview 232 12/15/2025
0.1.4-preview 233 12/15/2025
0.1.3-preview 114 12/12/2025
0.1.2-preview 414 12/11/2025
Loading failed