EasyCompany.Extensions.Configuration.AWSSimpleSystemsManagement 1.0.0

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

EasyCompany.AWSSimpleSystemsManagementExtensions

A .NET configuration provider extension for AWS Systems Manager Parameter Store that seamlessly integrates with Microsoft.Extensions.Configuration.

License .NET

Overview

This library provides an easy way to load configuration values from AWS Systems Manager Parameter Store into your .NET applications. It supports JSON parameters with nested structures and automatically flattens them into the standard .NET configuration format.

Features

  • ✅ Load JSON parameters from AWS Parameter Store
  • ✅ Support for nested JSON structures (objects and arrays)
  • ✅ Automatic flattening to .NET configuration key format
  • ✅ Support for encrypted parameters (SecureString)
  • ✅ Optional parameter loading (won't fail if parameter doesn't exist)
  • ✅ Multiple authentication methods (IAM roles, access keys)
  • ✅ Seamless integration with Microsoft.Extensions.Configuration

Installation

dotnet add package EasyCompany.Extensions.Configuration.AWSSimpleSystemsManagement

Usage

Basic Usage with IAM Authentication

using Microsoft.Extensions.Configuration;

var configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json", optional: true)
    .AddSimpleSystemsManagementJson(
        region: "us-east-1",
        parameterName: "/myapp/config",
        jsonObjectName: "MySettings",
        isEncrypted: false,
        optional: true)
    .Build();

// Access configuration values
var connectionString = configuration["MySettings:ConnectionStrings:DefaultConnection"];
var apiKey = configuration["MySettings:ApiKey"];

Usage with Access Keys

var configuration = new ConfigurationBuilder()
    .AddSimpleSystemsManagementJson(
        accessKeyId: "YOUR_ACCESS_KEY",
        secretAccessKey: "YOUR_SECRET_KEY",
        region: "us-east-1",
        parameterName: "/myapp/config",
        jsonObjectName: "MySettings",
        isEncrypted: false,
        optional: true)
    .Build();

Parameter Store JSON Format

Store your configuration in AWS Parameter Store as JSON. The provider automatically flattens nested structures:

Parameter Store Value:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=mydb;",
    "RedisConnection": "localhost:6379"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning"
    }
  },
  "ApiKeys": ["key1", "key2", "key3"]
}
Resulting Configuration Keys:
MySettings:ConnectionStrings:DefaultConnection = "Server=localhost;Database=mydb;"
MySettings:ConnectionStrings:RedisConnection = "localhost:6379"
MySettings:Logging:LogLevel:Default = "Information"
MySettings:Logging:LogLevel:Microsoft = "Warning"
MySettings:ApiKeys:0 = "key1"
MySettings:ApiKeys:1 = "key2"
MySettings:ApiKeys:2 = "key3"

Configuration Options

Parameter Type Description
region string AWS region where the parameter is stored (e.g., "us-east-1")
parameterName string The name/path of the parameter in Parameter Store (e.g., "/myapp/config")
jsonObjectName string Optional prefix for all configuration keys
isEncrypted bool Whether the parameter is encrypted (SecureString). Default: false
optional bool If true, won't throw an exception if the parameter doesn't exist. Default: false

Encrypted Parameters

To work with encrypted parameters (SecureString type in Parameter Store):

.AddSimpleSystemsManagementJson(
    region: "us-east-1",
    parameterName: "/myapp/secrets",
    jsonObjectName: "Secrets",
    isEncrypted: true,  // Enable decryption
    optional: false)

Note: Make sure your IAM role or user has the kms:Decrypt permission for the KMS key used to encrypt the parameter.

AWS Permissions Required

Your application needs the following IAM permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ssm:GetParameter"
      ],
      "Resource": "arn:aws:ssm:REGION:ACCOUNT_ID:parameter/YOUR_PARAMETER_PATH"
    }
  ]
}

For encrypted parameters, also add:

{
  "Effect": "Allow",
  "Action": [
    "kms:Decrypt"
  ],
  "Resource": "arn:aws:kms:REGION:ACCOUNT_ID:key/YOUR_KMS_KEY_ID"
}

ASP.NET Core Integration

In your Program.cs:

var builder = WebApplication.CreateBuilder(args);

builder.Configuration.AddSimpleSystemsManagementJson(
    region: builder.Configuration["AWS:Region"] ?? "us-east-1",
    parameterName: builder.Configuration["AWS:ParameterName"] ?? "/myapp/config",
    jsonObjectName: "AppSettings",
    isEncrypted: true,
    optional: false);

var app = builder.Build();

Error Handling

The provider throws an InvalidOperationException if:

  • The parameter doesn't exist and optional is set to false
  • The parameter value is empty or null
  • The JSON format is invalid

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

Repository

https://github.com/eugenetomes/EasyCompany.AWSSimpleSystemsManagementExtensions

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

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.0.0 132 6/16/2026

Initial Extension