Skip to content

How to add ParameterStore to Lambda?

0

I have created Lambda in VS2022 using template from AWS. It has Startup.cs only. Where can I add SystemsManager, i.e. do something like this: public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureAppConfiguration(builder => { builder.AddSystemsManager("/myapplication"); }) .UseStartup<Startup>();

asked 3 years ago380 views
1 Answer
1

Which template did you use?

The new serverless lambda template use the same convension as the new ASP.NET Core project template (only Program.cs without Startup.cs).

If you are using the new ASP.NET based template then you can add Parameter store store support to you Lambda function in the same way you add it to ASP.NET Core application (because the template you have selected (in Startup.cs):

var builder = WebApplication.CreateBuilder(args);
. . .

builder.Host.ConfigureAppConfiguration(((_, configBuilder) =>
{
    configBuilder.AddSystemsManager("/myapplication");
}));

. . .
var builder = WebApplication.CreateBuilder(args);
. . .

AWS
answered 3 years ago
  • My VS2022 is updated. I have used the sequence AWS Serverless Application (.NET Core - c#) ASP.NET Core Web API It created the app with Startup and LocalEntryPoint.cs, LambdaEntryPoint.cs files

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.