NSchema.Aws
2.0.0
See the version list below for details.
dotnet add package NSchema.Aws --version 2.0.0
NuGet\Install-Package NSchema.Aws -Version 2.0.0
<PackageReference Include="NSchema.Aws" Version="2.0.0" />
<PackageVersion Include="NSchema.Aws" Version="2.0.0" />
<PackageReference Include="NSchema.Aws" />
paket add NSchema.Aws --version 2.0.0
#r "nuget: NSchema.Aws, 2.0.0"
#:package NSchema.Aws@2.0.0
#addin nuget:?package=NSchema.Aws&version=2.0.0
#tool nuget:?package=NSchema.Aws&version=2.0.0
NSchema.Aws
AWS provider for NSchema, the declarative database schema migration library for .NET.
This package plugs an S3-backed implementation of NSchema's ISchemaStateStore into your application, enabling offline migration planning without live database access.
Getting started
Install the core package and this provider:
dotnet add package NSchema
dotnet add package NSchema.Aws
Register the S3 state store against an NSchemaApplicationBuilder:
using NSchema;
using NSchema.Aws;
var builder = NSchemaApplication.CreateBuilder(args);
builder
.AddSchemasFromAssemblyContaining<Program>()
.UseCurrentSchemaPostgres(connectionString)
.UseStateStoreS3("my-bucket", "nschema/state.json");
var app = builder.Build();
await app.Apply();
Configuration
UseStateStoreS3 has three overloads:
// 1. Bucket and key directly.
builder.UseStateStoreS3("my-bucket", "nschema/state.json");
// 2. Configure options via a delegate.
builder.UseStateStoreS3(o =>
{
o.Bucket = configuration["NSchema:Bucket"]!;
o.Key = configuration["NSchema:Key"]!;
});
// 3. As above, with access to the IServiceProvider.
builder.UseStateStoreS3((o, sp) =>
{
var config = sp.GetRequiredService<IConfiguration>();
o.Bucket = config["NSchema:Bucket"]!;
o.Key = config["NSchema:Key"]!;
});
By default an AmazonS3Client using ambient credentials (ECS task role, Lambda execution role, environment variables, etc.) is registered automatically. To bring your own client:
// Register via AWSSDK.Extensions.NETCore.Setup before calling UseStateStoreS3.
builder.Services.AddAWSService<IAmazonS3>();
builder.UseStateStoreS3("my-bucket", "nschema/state.json");
IAM permissions
| Role | Required permission |
|---|---|
| Deploy / Refresh | s3:GetObject, s3:PutObject |
| Plan (PR build) | s3:GetObject |
Example policy (scoped to the state object):
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::my-bucket/nschema/state.json"
}
Locking
State writes are last-write-wins. Concurrent applies will silently overwrite each other's state. This is acceptable when deploys are serialised (e.g. a single ECS task per environment).
License
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. |
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 |
|---|---|---|
| 3.0.0-alpha.5 | 0 | 6/7/2026 |
| 3.0.0-alpha.4 | 43 | 6/6/2026 |
| 3.0.0-alpha.3 | 41 | 6/6/2026 |
| 3.0.0-alpha.2 | 38 | 6/5/2026 |
| 3.0.0-alpha.1 | 47 | 6/4/2026 |
| 2.0.0 | 113 | 6/1/2026 |
| 2.0.0-alpha.2 | 69 | 5/31/2026 |
| 2.0.0-alpha.1 | 82 | 5/30/2026 |