Rig.TUnit.Storage.S3
0.1.0-beta.2
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
<PackageReference Include="Rig.TUnit.Storage.S3" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Storage.S3" Version="0.1.0-beta.2" />
<PackageReference Include="Rig.TUnit.Storage.S3" />
paket add Rig.TUnit.Storage.S3 --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Storage.S3, 0.1.0-beta.2"
#:package Rig.TUnit.Storage.S3@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Storage.S3&version=0.1.0-beta.2&prerelease
#tool nuget:?package=Rig.TUnit.Storage.S3&version=0.1.0-beta.2&prerelease
Rig.TUnit.Storage.S3
LocalStack-backed Amazon S3 fixture with
IAmazonS3and pure-functionS3SasBuilderfor 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 —
.MinIOis 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.S3FixtureRig.TUnit.Storage.S3.Options.S3FixtureOptionsRig.TUnit.Storage.S3.Builder.S3RigBuilderRig.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
PermanentRedirecton get/put — LocalStack forces path-style addressing; setForcePathStyle=trueon the AWSSDK client (the fixture does this by default).InvalidBucketName— bucket names must be lowercase, 3–63 chars, no underscores; theIsolationKeysuffix 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.
Related docs
- Architecture diagram
- Glossary
- Family base:
Rig.TUnit.Storage - Sibling:
Rig.TUnit.Storage.MinIO
License
MIT. See LICENSE.
| Product | Versions 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. |
-
net10.0
- AWSSDK.S3 (>= 3.7.405)
- Bogus (>= 35.6.1)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Rig.TUnit.Storage (>= 0.1.0-beta.2)
- Testcontainers (>= 4.11.0)
- Testcontainers.LocalStack (>= 4.11.0)
- TUnit.Core (>= 1.34.5)
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 |