github aws-powertools/powertools-lambda-python v1.3.0

latest releases: v3.2.0, v3.1.0, v3.0.0...
4 years ago

Changes

Sample code snippet of the parameters utility

Add a new utility to fetch and cache parameter values from AWS Systems Manager Parameter Store, AWS Secrets Manager or Amazon DynamoDB. It also provides a base class to create your parameter provider implementation.

Retrieve values from Systems Manager Parameter Store:

from aws_lambda_powertools.utilities import parameters

def handler(event, context):
    # Retrieve a single parameter
    value = parameters.get_parameter("/my/parameter")

    # Retrieve multiple parameters from a path prefix recursively
    # This returns a dict with the parameter name as key
    values = parameters.get_parameters("/my/path/prefix")
    for k, v in values.items():
        print(f"{k}: {v}")

Retrieve secrets from AWS Secrets Managers:

from aws_lambda_powertools.utilities import parameters

def handler(event, context):
    # Retrieve a single secret
    value = parameters.get_secret("my-secret")

🌟 Minor Changes

This release was made possible by the following contributors:

@nmoutschen

Don't miss a new powertools-lambda-python release

NewReleases is sending notifications on new releases.