~/codewithstu

// open_source

GOA

High-performance .NET framework for AWS Lambda with native AOT support, lightweight service clients, and minimal cold start overhead

View on GitHub

Goa is my high-performance, minimal-overhead .NET framework for building AWS Lambda functions with native AOT support. Goa provides lightweight clients for AWS services and streamlined function development patterns that replace the heavyweight AWS SDK.

Motivation

The AWS SDK for .NET carries significant overhead that impacts Lambda function performance. Goa addresses this by providing lean, purpose-built packages:

  • Modern .NET: Built with HttpClientFactory, native AOT support, dependency injection, and source generators
  • Performance: Massively reduced memory allocations and cold start times through minimal dependencies
  • Security: Exposes only essential operations, preventing reconfiguration issues

Key Features

  • Native ahead-of-time (AOT) compilation support
  • Minimal dependencies with lean implementations
  • Full C# type safety with source generators
  • Multi-target support for .NET 9.0 and .NET 10.0
  • Project templates for rapid scaffolding

Getting Started

Install the project templates and scaffold a new function:

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

Templates are available for API Gateway, DynamoDB streams, EventBridge, Kinesis, S3, and SQS triggers.

Components

PackageDescription
Goa.CoreCore utilities and extensions
Goa.Functions.CoreRuntime and bootstrapping functionality
Goa.Functions.ApiGatewayAPI Gateway integration (V1/V2 payload support)
Goa.Functions.DynamoDynamoDB stream processing
Goa.Functions.EventBridgeEventBridge event processing
Goa.Functions.KinesisKinesis stream processing
Goa.Functions.S3S3 event processing
Goa.Functions.SqsSQS message processing
Goa.Clients.DynamoDynamoDB client with source generator support
Goa.Clients.EventBridgeEventBridge client for event routing
Goa.Clients.LambdaLambda client for function invocation
Goa.Clients.S3S3 client for object storage
Goa.Clients.SqsSQS client for queue operations
Goa.Clients.SecretsManagerSecrets Manager client
Goa.Clients.ParameterStoreSystems Manager Parameter Store client
Goa.TemplatesProject templates for rapid development

All packages are available on NuGet.