Goa.Functions.Dynamo 0.0.3-preview.1

This is a prerelease version of Goa.Functions.Dynamo.
dotnet add package Goa.Functions.Dynamo --version 0.0.3-preview.1
                    
NuGet\Install-Package Goa.Functions.Dynamo -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.Dynamo" 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.Dynamo" Version="0.0.3-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Goa.Functions.Dynamo" />
                    
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.Dynamo --version 0.0.3-preview.1
                    
#r "nuget: Goa.Functions.Dynamo, 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.Dynamo@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.Dynamo&version=0.0.3-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Goa.Functions.Dynamo&version=0.0.3-preview.1&prerelease
                    
Install as a Cake Tool

Goa.Functions.Dynamo

Process DynamoDB Streams events in AWS Lambda with high performance and native AOT support. This package provides a streamlined way to handle DynamoDB change data capture events, supporting both single-record and batch processing patterns with built-in error handling and integration with the Goa DynamoDB mapper for seamless object deserialization.

Quick Start

dotnet new install Goa.Templates
dotnet new goa.dynamodb -n "MyDynamoFunction"

Features

  • Flexible Processing Modes: Choose between processing records one at a time or as a batch
  • DynamoDB Mapper Integration: Seamlessly deserialize DynamoDB records to strongly-typed objects
  • Stream Event Support: Handle INSERT, MODIFY, and REMOVE operations from DynamoDB Streams
  • Native AOT Ready: Optimized for ahead-of-time compilation with minimal cold starts
  • Error Handling: Built-in support for marking individual records as failed for partial batch failures
  • Dependency Injection: Full integration with .NET's dependency injection container
  • Type-Safe: Strongly-typed stream records with full IntelliSense support

Basic Usage

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

await Host.CreateDefaultBuilder()
    .UseLambdaLifecycle()
    .ForDynamoDB()
    .ProcessOneAtATime()
    .HandleWith<IMyService>(async (service, record) =>
    {
        // Process each DynamoDB stream record        if (record.EventName == DynamoStreamOperation.INSERT)
        {
            // DynamoMapper.MyItem is generated by the source generator
            var item = DynamoMapper.MyItem.FromDynamoRecord(record.Dynamodb!.NewImage!);
            await service.ProcessNewItem(item);
        }
    })
    .WithServices(services =>
    {
        // Register your services
        services.AddScoped<IMyService, MyService>();
    })
    .RunAsync();

// Define your model with DynamoDB attributes for source generation
[DynamoModel(PK = "ITEM#<Id>", SK = "META")]
public record MyItem(string Id, string Name, DateTime CreatedAt);

public interface IMyService
{
    Task ProcessNewItem(MyItem item);
}

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

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.0.3-preview.1 47 8/23/2025
0.0.2-preview.2.3 112 8/18/2025
0.0.2-preview.2.2 130 8/17/2025
0.0.2-preview.2.1 115 8/17/2025
0.0.2-preview.2 192 8/9/2025
0.0.0-alpha.0.32 76 12/7/2024
0.0.0-alpha.0.20 76 10/27/2024