I am trying to use the AWS .NET Configuration Extension for Systems Manager Nuget package (Amazon.Extensions.Configuration.SystemsManager
) to retrieve configurations stored in AWS Parameter Store.
I am using the following lines of code taken from the GitHub documentation:
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration(builder =>
{
builder.AddAppConfig("AppConfigApplicationId", "AppConfigEnvironmentId", "AppConfigConfigurationProfileId", TimeSpan.FromSeconds(20));
})
.UseStartup<Startup>();
After running the code I am getting a NotImplementedException
being thrown with the message:
Not implemented AppConfig type: application/octet-stream
2
Answers
You’re calling the wrong method on the builder.
For obtaining values from AWS SSM’s Parameter Store, you should be using
builder.AddSystemsManager
:Using
builder.AddAppConfig
is for obtaining values from AWS SSM’s AppConfig, not Parameter Store.I found then if I stored data that was more complex than a single word in Parameter store it would give me the
NotImplementedException: Not implemented AppConfig type: application/octet-stream.
In that case you would need to use.AddSystemsManager()
instead.