Microsoft.Orleans.Persistence.DynamoDB 9.2.0-preview3

Prefix Reserved
This is a prerelease version of Microsoft.Orleans.Persistence.DynamoDB.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.Orleans.Persistence.DynamoDB --version 9.2.0-preview3
                    
NuGet\Install-Package Microsoft.Orleans.Persistence.DynamoDB -Version 9.2.0-preview3
                    
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="Microsoft.Orleans.Persistence.DynamoDB" Version="9.2.0-preview3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Orleans.Persistence.DynamoDB" Version="9.2.0-preview3" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Persistence.DynamoDB" />
                    
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 Microsoft.Orleans.Persistence.DynamoDB --version 9.2.0-preview3
                    
#r "nuget: Microsoft.Orleans.Persistence.DynamoDB, 9.2.0-preview3"
                    
#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 Microsoft.Orleans.Persistence.DynamoDB@9.2.0-preview3
                    
#: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=Microsoft.Orleans.Persistence.DynamoDB&version=9.2.0-preview3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Persistence.DynamoDB&version=9.2.0-preview3&prerelease
                    
Install as a Cake Tool

Microsoft Orleans Persistence for DynamoDB

Introduction

Microsoft Orleans Persistence for DynamoDB provides grain persistence for Microsoft Orleans using Amazon's DynamoDB. This allows your grains to persist their state in DynamoDB and reload it when they are reactivated.

Getting Started

To use this package, install it via NuGet:

dotnet add package Microsoft.Orleans.Persistence.DynamoDB

Example - Configuring DynamoDB Persistence

using Microsoft.Extensions.Hosting;
using Orleans.Configuration;
using Orleans.Hosting;

var builder = Host.CreateApplicationBuilder(args)
    .UseOrleans(siloBuilder =>
    {
        siloBuilder
            .UseLocalhostClustering()
            // Configure DynamoDB as grain storage
            .AddDynamoDBGrainStorage(
                name: "dynamoStore",
                configureOptions: options =>
                {
                    options.AccessKey = "YOUR_AWS_ACCESS_KEY";
                    options.SecretKey = "YOUR_AWS_SECRET_KEY";
                    options.Region = "us-east-1";
                    options.TableName = "OrleansGrainState";
                    options.CreateIfNotExists = true;
                });
    });

// Run the host
await builder.RunAsync();

Example - Using Grain Storage in a Grain

// Define grain state class

public class MyGrainState
{
    public string Data { get; set; }
    public int Version { get; set; }
}

// Grain implementation that uses the DynamoDB storage
public class MyGrain : Grain, IMyGrain, IGrainWithStringKey
{
    private readonly IPersistentState<MyGrainState> _state;

    public MyGrain([PersistentState("state", "dynamoStore")] IPersistentState<MyGrainState> state)
    {
        _state = state;
    }

    public async Task SetData(string data)
    {
        _state.State.Data = data;
        _state.State.Version++;
        await _state.WriteStateAsync();
    }

    public Task<string> GetData()
    {
        return Task.FromResult(_state.State.Data);
    }
}

Documentation

For more comprehensive documentation, please refer to:

Feedback & Contributing

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 was computed.  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 Microsoft.Orleans.Persistence.DynamoDB:

Package Downloads
Microsoft.Orleans.OrleansAWSUtils

Library of utility types for Amazon AWS of Microsoft Orleans.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Microsoft.Orleans.Persistence.DynamoDB:

Repository Stars
PiotrJustyna/road-to-orleans
This repository illustrates the road to orleans with practical, real-life examples. From most basic, to more advanced techniques.
Version Downloads Last Updated
9.2.1 1,706 7/16/2025
9.2.0 486 7/14/2025
9.2.0-preview3 294 6/10/2025
9.2.0-preview2 157 6/4/2025
9.2.0-preview1 119 4/4/2025
9.1.2 37,554 2/13/2025
9.0.1 32,834 11/23/2024
9.0.0 1,090 11/14/2024
8.2.0 26,688 7/12/2024
8.2.0-preview1 191 5/22/2024
8.1.0 44,257 4/17/2024
8.1.0-preview3 242 3/11/2024
8.1.0-preview2 151 2/23/2024
8.1.0-preview1 150 2/13/2024
8.0.0 49,675 1/5/2024
8.0.0-rc2 268 12/20/2023
8.0.0-rc1 179 12/4/2023
7.2.7 160 10/15/2024
7.2.6 4,972 3/9/2024
7.2.5 195 2/22/2024
7.2.4 5,879 12/2/2023
7.2.3 14,601 11/3/2023
7.2.2 4,017 10/16/2023
7.2.1 12,526 7/11/2023
7.2.0 268 7/7/2023
7.1.2 22,846 4/19/2023
7.1.1 9,593 3/23/2023
7.1.0 4,115 2/1/2023
7.0.0 12,645 11/8/2022
7.0.0-rc2 326 10/19/2022
4.0.0-preview2 1,712 8/4/2022
4.0.0-preview1 2,072 2/10/2022
3.8.0 175 5/6/2025
3.8.0-preview5 222 5/12/2025
3.8.0-preview3 195 4/8/2025
3.8.0-preview2 120 4/4/2025
3.8.0-preview1 193 3/31/2025
3.7.2 3,505 5/10/2024
3.7.1 14,585 5/27/2023
3.7.0 1,766 3/23/2023
3.6.5 42,855 8/15/2022
3.6.4 528 8/10/2022
3.6.3 516 8/4/2022
3.6.2 16,320 4/15/2022
3.6.1 895 4/5/2022
3.6.0 8,044 1/20/2022
3.5.1 10,810 11/8/2021
3.5.0 17,440 9/3/2021
3.4.4 512 10/4/2021
3.4.3 6,508 6/3/2021
3.4.2 3,398 4/5/2021
3.4.1 11,562 2/3/2021
3.4.0 84,839 1/6/2021
3.4.0-rc1 513 12/9/2020
3.3.0 18,468 9/9/2020
3.3.0-rc2 483 9/2/2020
3.3.0-rc1 474 8/19/2020
3.2.2 6,123 7/22/2020
3.2.1 851 7/2/2020
3.2.0 1,370 6/4/2020
3.2.0-rc2 539 5/20/2020
3.2.0-rc1 487 5/7/2020
3.1.7 2,059 5/19/2020
3.1.6 6,055 4/16/2020
3.1.5 771 4/9/2020
3.1.4 1,287 3/26/2020
3.1.3 1,086 3/16/2020
3.1.2 3,086 3/5/2020
3.1.0 1,038 2/23/2020
3.1.0-rc3 573 2/13/2020
3.1.0-rc2 591 2/12/2020
3.1.0-rc1 620 2/10/2020
3.0.2 2,594 12/12/2019
3.0.1 835 11/27/2019
3.0.0 1,326 10/24/2019
3.0.0-rc2 633 10/16/2019
3.0.0-rc1 644 10/9/2019
3.0.0-beta1 1,276 8/16/2019
2.4.5 13,073 12/29/2019
2.4.4 1,191 11/27/2019
2.4.3 1,449 10/10/2019
2.4.2 5,785 8/31/2019
2.4.1 1,751 8/14/2019
2.4.0 1,535 8/8/2019
2.3.6 1,817 7/24/2019
2.3.5 5,258 6/14/2019
2.3.4 1,611 6/4/2019
2.3.3 1,321 6/2/2019
2.3.2 2,201 5/9/2019
2.3.1 1,446 4/26/2019
2.3.0 3,147 3/20/2019
2.3.0-rc2 713 3/13/2019
2.3.0-rc1 781 3/4/2019
2.2.4 2,368 2/25/2019
2.2.3 2,607 1/17/2019
2.2.0 1,511 12/13/2018
2.2.0-rc1 882 12/4/2018
2.2.0-beta1 1,003 10/21/2018
2.1.2 3,722 10/11/2018
2.1.0 1,722 9/28/2018
2.1.0-rc2 1,225 9/21/2018
2.1.0-rc1 1,241 9/14/2018
2.1.0-beta1 1,217 8/27/2018
2.0.0 8,706 3/28/2018
2.0.0-rc2 5,114 3/13/2018
2.0.0-rc1 1,233 2/26/2018
2.0.0-beta3 3,071 12/21/2017