Skip to main content
net6.0net8.0

Powertools for AWS Lambda (.NET) - Parameters package.

Published
Mar 10, 2024
2y ago
Total Downloads
582.3K
582,323

Install

dotnet add package AWS.Lambda.Powertools.Parameters --version 1.3.0
ProductVersions
.NET
net6.0net8.0

README

AWS.Lambda.Powertools.Parameters

The Parameters utility provides high-level functionality to retrieve one or multiple parameter values from AWS Systems Manager Parameter Store, AWS Secrets Manager, or Amazon DynamoDB. Or bring your own providers.

Key features

  • Retrieve one or multiple parameters from the underlying provider
  • Cache parameter values for a given amount of time (defaults to 5 seconds)
  • Transform parameter values from JSON or base 64 encoded strings
  • Bring your own parameter store provider

Read the docs

For a full list of features go to docs.powertools.aws.dev/lambda/dotnet/utilities/parameters/

GitHub: https://github.com/aws-powertools/powertools-lambda-dotnet/

Sample Function using AWS Systems Manager Parameter Store

using AWS.Lambda.Powertools.Logging;
using AWS.Lambda.Powertools.Parameters;
using AWS.Lambda.Powertools.Parameters.SimpleSystemsManagement;

namespace HelloWorld;

public class Function
{
    [Logging(LogEvent = true)]
    public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest apigwProxyEvent,
        ILambdaContext context)
    {    
        // Get SSM Provider instance
        ISsmProvider ssmProvider = ParametersManager.SsmProvider;

        // Retrieve a single parameter
        string? value = await ssmProvider
            .GetAsync("/my/parameter")
            .ConfigureAwait(false);

        // Retrieve multiple parameters from a path prefix
        // This returns a Dictionary with the parameter name as key
        IDictionary<string, string?> values = await ssmProvider
            .GetMultipleAsync("/my/path/prefix")
            .ConfigureAwait(false);

        ...

    }
}

Changes from Previous Version

v1.2.0v1.3.0
Added Dependencies

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.The published metadata declares 14 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.