Goa.Functions.S3 0.0.3-preview.1

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

Goa.Functions.S3

Process Amazon S3 events in AWS Lambda with high performance and native AOT support. This package provides comprehensive S3 event handling capabilities including object creation, deletion, replication, lifecycle transitions, and intelligent tiering events with flexible processing modes and built-in error handling for reliable object storage workflows.

Quick Start

dotnet new install Goa.Templates
dotnet new goa.s3 -n "MyS3Function"

Features

  • Comprehensive Event Support: Handle all S3 event types including ObjectCreated, ObjectRemoved, Restore, Replication, and Lifecycle events
  • Flexible Processing Modes: Process S3 event records individually or as a batch
  • Native AOT Ready: Optimized for ahead-of-time compilation with minimal cold starts
  • Rich Event Metadata: Access detailed information about S3 objects, buckets, and user identity
  • Error Handling: Mark individual records as failed for partial batch failure reporting
  • URL Decoding: Automatic handling of URL-encoded object keys
  • Dependency Injection: Full integration with .NET's dependency injection container

Basic Usage

using Goa.Functions.Core;
using Goa.Functions.S3;
using Microsoft.Extensions.Hosting;
using System.Web;

await Host.CreateDefaultBuilder()
    .UseLambdaLifecycle()
    .ForS3()
    .ProcessOneAtATime()
    .HandleWith<IImageProcessor>(async (processor, record) =>
    {
        // Get S3 object details
        var bucketName = record.S3!.Bucket!.Name;
        var objectKey = HttpUtility.UrlDecode(record.S3.Object!.Key);
        var objectSize = record.S3.Object.Size;
        
        // Process based on event type
        if (record.EventName!.StartsWith("ObjectCreated"))
        {
            await processor.ProcessNewImage(bucketName!, objectKey, objectSize!.Value);
        }
        else if (record.EventName.StartsWith("ObjectRemoved"))
        {
            await processor.HandleImageDeletion(bucketName!, objectKey);
        }
    })
    .RunAsync();

public interface IImageProcessor
{
    Task ProcessNewImage(string bucket, string key, long size);
    Task HandleImageDeletion(string bucket, string key);
}

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 40 8/23/2025
0.0.2-preview.2.3 108 8/18/2025
0.0.2-preview.2.2 114 8/17/2025
0.0.2-preview.2.1 113 8/17/2025
0.0.2-preview.2 113 8/9/2025
0.0.0-alpha.0.32 87 12/7/2024
0.0.0-alpha.0.20 70 10/27/2024