Search code examples
c#.netamazon-web-services.net-6.0aws-parameter-store

C# AWS Parameter Store - Configuration not loading SystemManagerConfiguration in .Net 6


Application is not able to talk to AWS Parameter Store in .NET 6. It is always talking to appsettings.json.

I tried debugging locally, still same behavior. Not able to find the SystemManagerConfiguration under list of configuration .

enter image description here

var builder = WebApplication.CreateBuilder();
var connectionString = builder.Configuration.GetConnectionString("OrderTrackerDatabase");

enter image description here

Packages Used

enter image description here

Library Source Code : https://github.com/aws/aws-dotnet-extensions-configuration

image


Solution

  • WebApplication.CreateBuilder() will create new instance and doesn't carry over the SystemManager configuration.

    Instead, use IConfiguration instance through constructor DI.

     var connectionString = _configuration.GetConnectionString("OrderTrackerDatabase");