Skip to content

Bug: POWERTOOLS_PARAMETERS_SSM_DECRYPT environment variable not respected for get multiple #3240

Closed
@sean-hernon

Description

@sean-hernon

Expected Behaviour

When the environment variable POWERTOOLS_PARAMETERS_SSM_DECRYPT is set to true, a call to get_multiple parameters should automatically decrypt the values, as is the way with a call to get.

Current Behaviour

The POWERTOOLS_PARAMETERS_SSM_DECRYPT is ignored when calling get_multiple and only the explicit decrypt argument is respected.

Code snippet

from aws_lambda_powertools.utilities.parameters.ssm import SSMProvider
import os

os.environ['POWERTOOLS_PARAMETERS_SSM_DECRYPT'] = 'true'
ssm_provider = SSMProvider()

for _, v in ssm_provider.get_multiple('/some/parameters').items():
    print(v) # Still encrypted

Possible Solution

#3241

Steps to Reproduce

Please see code snippet

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.10

Packaging format used

PyPi

Debugging logs

No response

Metadata

Metadata

Labels

bugSomething isn't workingparametersParameters utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions