AWSSecretsManager.Provider 1.1.1.15

dotnet add package AWSSecretsManager.Provider --version 1.1.1.15
                    
NuGet\Install-Package AWSSecretsManager.Provider -Version 1.1.1.15
                    
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="AWSSecretsManager.Provider" Version="1.1.1.15" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AWSSecretsManager.Provider" Version="1.1.1.15" />
                    
Directory.Packages.props
<PackageReference Include="AWSSecretsManager.Provider" />
                    
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 AWSSecretsManager.Provider --version 1.1.1.15
                    
#r "nuget: AWSSecretsManager.Provider, 1.1.1.15"
                    
#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 AWSSecretsManager.Provider@1.1.1.15
                    
#: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=AWSSecretsManager.Provider&version=1.1.1.15
                    
Install as a Cake Addin
#tool nuget:?package=AWSSecretsManager.Provider&version=1.1.1.15
                    
Install as a Cake Tool

AWSSecretsManager.Provider

All Contributors

NuGet version NuGet Downloads Build Status

This is a modern, community-maintained fork of Kralizek/AWSSecretsManagerConfigurationExtensions, originally developed by Renato Golia.

It provides a configuration provider for Microsoft.Extensions.Configuration that loads secrets from AWS Secrets Manager.


🚀 What's New in This Fork

  • ✅ Targeted to .NET 8 and .NET 9
  • ✅ Converted to use System.Text.Json only
  • ✅ Refactored structure for better modern SDK usage
  • NEW: Comprehensive logging support with ILogger integration
  • ✅ Published as a new NuGet package: AWSSecretsManager.Provider

🔧 Usage

ASP.NET Core Example

public class Program
{
    public static void Main(string[] args)
    {
        CreateHostBuilder(args).Build().Run();
    }

    public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .ConfigureAppConfiguration((context, config) =>
            {
                config.AddSecretsManager(); // 👈 AWS Secrets Manager integration
            })
            .ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.UseStartup<Startup>();
            });
}

Console App Example

static void Main(string[] args)
{
    var builder = new ConfigurationBuilder();
    builder.AddSecretsManager();

    var config = builder.Build();
    Console.WriteLine("Secret: " + config["MySecret"]);
}

Your application must have AWS credentials available through the default AWS SDK mechanisms. Learn more here:
👉 AWS SDK Credential Config

📋 Logging Support

The provider includes comprehensive logging support for better observability:

// Using ILoggerFactory (recommended)
using var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
builder.Configuration.AddSecretsManager(
    loggerFactory,
    configurator: options => options.PollingInterval = TimeSpan.FromMinutes(5));

// Using explicit ILogger
var logger = loggerFactory.CreateLogger<SecretsManagerConfigurationProvider>();
builder.Configuration.AddSecretsManager(
    logger,
    configurator: options => options.PollingInterval = TimeSpan.FromMinutes(5));

Log Levels:

  • Information: Key operations (loading, reloading, polling status)
  • Debug: Batch processing details and secret counts
  • Trace: Individual secret processing and change detection
  • Warning: Polling errors and missing secrets (when ignored)
  • Error: Failed operations with full context

Example Log Output:

[Information] Loading secrets from AWS Secrets Manager
[Debug] Fetching 15 secrets in 1 batches
[Information] Successfully loaded 47 configuration keys in 1,234ms
[Information] Starting secret polling with interval 00:05:00

🔒 Configuration Options

This provider supports several customization options, including:

  • Credentials: Pass your own credentials if needed.
  • Region: Customize the AWS region.
  • Filtering: Control which secrets are loaded via filters or explicit allow lists.
  • Key generation: Customize how configuration keys are named.
  • Version stage: Set version stages for secrets.
  • Logging: Full logging support with ILogger integration for observability.
  • LocalStack support: Override ServiceUrl for local testing.

Refer to samples for examples of each option.


📦 Installation

dotnet add package AWSSecretsManager.Provider

✅ Building Locally

This repo is built with the standard .NET SDK:

dotnet build
dotnet test

🙌 Acknowledgments

This project is based on the excellent work by Renato Golia and inspired by the broader .NET and AWS developer community.


📄 License

This project is licensed under the MIT License.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

<table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ncipollina"><img src="https://avatars.githubusercontent.com/u/1405469?v=4?s=100" width="100px;" alt="Nick Cipollina"/><br /><sub><b>Nick Cipollina</b></sub></a><br /><a href="https://github.com/LayeredCraft/aws-secrets-manager-provider/commits?author=ncipollina" title="Code">💻</a></td> </tr> </tbody> </table>

This project follows the all-contributors specification. Contributions of any kind welcome!

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
1.1.1.15 393 7/25/2025
1.1.1.14 702 7/10/2025
1.1.0.13 3,816 6/23/2025
1.1.0.12 2,931 6/6/2025
1.1.0-beta.11 118 6/5/2025
1.1.0-beta.10 119 6/5/2025
1.0.2-beta.9 117 6/5/2025
1.0.1.8 6,710 5/21/2025
1.0.1.7 410 5/19/2025
1.0.1.6 133 5/9/2025
1.0.1.4 574 5/8/2025