Goa.Functions.Core 0.0.3-preview.1

This is a prerelease version of Goa.Functions.Core.
dotnet add package Goa.Functions.Core --version 0.0.3-preview.1
                    
NuGet\Install-Package Goa.Functions.Core -Version 0.0.3-preview.1
                    
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.Core" Version="0.0.3-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Goa.Functions.Core" Version="0.0.3-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Goa.Functions.Core" />
                    
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.Core --version 0.0.3-preview.1
                    
#r "nuget: Goa.Functions.Core, 0.0.3-preview.1"
                    
#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.Core@0.0.3-preview.1
                    
#: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.Core&version=0.0.3-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goa.Functions.Core&version=0.0.3-preview.1&prerelease
                    
Install as a Cake Tool

Goa.Functions.Core

Core runtime and bootstrapping functionality for high-performance AWS Lambda functions. This package provides the foundational components for building Lambda functions with the Goa framework.

Installation

dotnet add package Goa.Functions.Core

Features

  • Native AOT support for faster Lambda cold starts
  • Built-in dependency injection with Microsoft.Extensions.DependencyInjection
  • Configuration management with environment variables
  • Structured logging support
  • Lambda runtime abstraction and bootstrapping
  • Minimal overhead and optimized performance

Usage

Basic Lambda Function

using Goa.Functions.Core;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

// Configure services
var builder = Host.CreateDefaultBuilder(args)
    .UseLambdaLifecycle()
    .WithServices(services =>
    {
        services.AddScoped<IMyService, MyService>();
        services.AddLogging();
    });

// Build and run as Lambda function
var function = new MyLambdaFunction(/* inject dependencies */);
var runnable = new Runnable(builder);
await runnable.RunAsync();

public class MyLambdaFunction : ILambdaFunction<string, string>
{
    private readonly IMyService _service;
    private readonly ILogger<MyLambdaFunction> _logger;
    
    public MyLambdaFunction(IMyService service, ILogger<MyLambdaFunction> logger)
    {
        _service = service;
        _logger = logger;
    }
    
    public async Task<string> InvokeAsync(string request, CancellationToken cancellationToken = default)
    {
        _logger.LogInformation("Processing request: {Request}", request);
        
        var result = await _service.ProcessAsync(request);
        
        _logger.LogInformation("Processing complete");
        
        return result;
    }
}

Using LambdaBootstrapService

using Goa.Functions.Core;
using Goa.Functions.Core.Bootstrapping;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System.Text.Json.Serialization;

public class Program
{
    public static async Task Main(string[] args)
    {
        var host = Host.CreateDefaultBuilder(args)
            .ConfigureServices(services =>
            {
                services.AddScoped<IDataProcessor, DataProcessor>();
                services.AddHostedService<LambdaBootstrapService<string, string>>();
            })
            .Build();
            
        await host.RunAsync();
    }
}

Custom Runtime Configuration

var builder = Host.CreateDefaultBuilder(args)
    .UseLambdaLifecycle()
    .WithServices(services =>
    {
        // Add your services
        services.AddScoped<IRepository, Repository>();
    })
    .WithConfiguration((context, config) =>
    {
        // Add custom configuration sources
        config.AddEnvironmentVariables();
    });

Key Interfaces

  • IRunnable - Interface for running Lambda functions
  • ILambdaFunction<TRequest, TResponse> - Base interface for Lambda function handlers
  • ILambdaBuilder - Builder interface for configuring Lambda functions
  • ILambdaRuntimeClient - Interface for Lambda runtime communication

Documentation

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

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (9)

Showing the top 5 NuGet packages that depend on Goa.Functions.Core:

Package Downloads
Goa.Functions.ApiGateway

API Gateway integration with V1/V2 payload support for high-performance AWS Lambda functions

Goa.Functions.Dynamo

DynamoDB stream processing for high-performance AWS Lambda functions

Goa.Functions.S3

S3 event processing for high-performance AWS Lambda functions

Goa.Functions.Kinesis

Kinesis stream processing for high-performance AWS Lambda functions

Goa.Functions.EventBridge

EventBridge function integration for high-performance AWS Lambda functions

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.3-preview.1 49 8/23/2025
0.0.2-preview.2.3 112 8/18/2025
0.0.2-preview.2.2 135 8/17/2025
0.0.2-preview.2.1 109 8/17/2025
0.0.2-preview.2 271 8/9/2025
0.0.0-alpha.0.32 150 12/7/2024
0.0.0-alpha.0.29 92 12/4/2024
0.0.0-alpha.0.20 91 10/27/2024