Goa.Functions.ApiGateway 0.7.1-preview

This is a prerelease version of Goa.Functions.ApiGateway.
dotnet add package Goa.Functions.ApiGateway --version 0.7.1-preview
                    
NuGet\Install-Package Goa.Functions.ApiGateway -Version 0.7.1-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.7.1-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.7.1-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.7.1-preview
                    
#r "nuget: Goa.Functions.ApiGateway, 0.7.1-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.7.1-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.7.1-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goa.Functions.ApiGateway&version=0.7.1-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.7.1-preview 54 1/26/2026
0.7.0-preview 48 1/26/2026
0.6.0-preview.1 152 12/5/2025
0.6.0-preview 630 12/3/2025
0.2.1-preview 69 1/20/2026
0.2.0-preview 84 1/14/2026
0.1.9-preview 64 1/1/2026
0.1.8-preview 230 12/15/2025
0.1.7-preview 200 12/15/2025
0.1.6-preview 194 12/15/2025
0.1.5-preview 205 12/15/2025
0.1.4-preview 208 12/15/2025
0.1.3-preview 87 12/12/2025
0.1.2-preview 386 12/11/2025
0.1.1-preview 385 12/11/2025
0.1.0-preview 378 12/10/2025
0.0.8-preview 382 12/10/2025
0.0.7-preview 392 12/8/2025
0.0.6-preview.2 380 12/8/2025
0.0.5-preview 195 11/2/2025
0.0.4-preview 105 10/25/2025
0.0.3-preview.4 105 10/25/2025
0.0.3-preview.2 126 9/28/2025
0.0.3-preview.1 80 8/23/2025
0.0.2-preview.2.3 148 8/18/2025
0.0.2-preview.2.2 170 8/17/2025
0.0.2-preview.2.1 119 8/17/2025
0.0.2-preview.2 235 8/9/2025
0.0.0-alpha.0.32 166 12/7/2024
0.0.0-alpha.0.29 120 12/4/2024
0.0.0-alpha.0.20 125 10/27/2024