Rig.TUnit.Storage.S3 0.1.0-beta.2

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

Rig.TUnit.Storage.S3

LocalStack-backed Amazon S3 fixture with IAmazonS3 and pure-function S3SasBuilder for presigned-URL construction.

What this package is

The Rig.TUnit AWS S3 provider. S3Fixture spins LocalStack with the S3 feature enabled and exposes a ready IAmazonS3 pointing at it. S3SasBuilder builds presign-request parameters purely — no server call required — so tests can assert on URL shape and expiry before actually hitting the signing endpoint.

Pick this when you need AWS-specific quirks (S3 Select, Intelligent Tiering, IAM policy stubs); pick .MinIO for the faster wire-compatible path.

When to use it

  • Integration tests using the full AWS SDK surface.
  • Verifying S3 Select / intelligent-tiering / lifecycle policies.
  • Cross-cutting tests that exercise IAM role assumptions.
  • Not for: simple put/get — .MinIO is faster.

Prerequisites

  • .NET 10 SDK
  • Docker Desktop / Colima (LocalStack image ~400 MB)
  • AWSSDK.S3 (transitive)

Quick start

using Amazon.S3.Model;
using Rig.TUnit.Storage.S3.Fixtures;

await using var fx = new S3Fixture();
await fx.InitializeAsync();

await fx.Client.PutBucketAsync("demo");

Options

Property Type Default Description
Image string "localstack/localstack:3" LocalStack image
StartupTimeoutSeconds int 120 LocalStack boot
Region string "us-east-1" AWS region label
AccessKeyId string "test" LocalStack dev
SecretAccessKey string "test" LocalStack dev

Fixture + helper APIs

  • Rig.TUnit.Storage.S3.Fixtures.S3Fixture
  • Rig.TUnit.Storage.S3.Options.S3FixtureOptions
  • Rig.TUnit.Storage.S3.Builder.S3RigBuilder
  • Rig.TUnit.Storage.S3.Helpers.S3SasBuilder

Per-test isolation

Per-test bucket: test-{IsolationKey:short}. Teardown clears and deletes. LocalStack handles bucket churn well.

Parallelism + performance

  • First-run pull: ~30 s.
  • Warm startup: ~10 s.
  • Per-test bucket create + delete: ~80 ms.
  • Parallelism: 6+ concurrent tests.

Troubleshooting

  • PermanentRedirect on get/put — LocalStack forces path-style addressing; set ForcePathStyle=true on the AWSSDK client (the fixture does this by default).
  • InvalidBucketName — bucket names must be lowercase, 3–63 chars, no underscores; the IsolationKey suffix is filesystem-safe and shouldn't break this, but custom prefixes can.

See docs/troubleshooting.md#s3.

Provider quirks + edge cases

  • LocalStack's S3 diverges from real AWS on: rate limiting (never throttles), consistency (always strong), IAM policy enforcement (permissive by default). Production parity tests must run against real AWS.
  • Presigned URLs expire in GMT; clock-skewed hosts produce 403.
  • S3 Select is supported in LocalStack but with a subset of SQL — test expression compatibility first.

Benchmarks

See S3Benchmarks.cs; baseline in benchmarks/baseline-005.json.

License

MIT. See LICENSE.

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 (1)

Showing the top 1 NuGet packages that depend on Rig.TUnit.Storage.S3:

Package Downloads
Rig.TUnit.All

Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-beta.2 47 4/27/2026
0.0.0-alpha.0.14 55 4/26/2026