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

Time:03-03

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

CodePudding user response:

I believe the problem might be the trailing slash after "/OrderTracking/", try "/OrderTracking" instead.

CodePudding user response:

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");
  • Related