Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sean-hernon opened this issue Oct 23, 2023 · 3 comments · Fixed by #3241
Closed
Assignees
Labels
bug Something isn't working parameters Parameters utility

Comments

@sean-hernon
Copy link
Contributor

sean-hernon commented Oct 23, 2023

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

@sean-hernon sean-hernon added bug Something isn't working triage Pending triage from maintainers labels Oct 23, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 23, 2023

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@leandrodamascena leandrodamascena self-assigned this Oct 23, 2023
@leandrodamascena leandrodamascena added parameters Parameters utility and removed triage Pending triage from maintainers labels Oct 23, 2023
@leandrodamascena leandrodamascena moved this from Triage to Working on it in Powertools for AWS Lambda (Python) Oct 23, 2023
@leandrodamascena
Copy link
Contributor

Hi @sean-hernon! Thank you so much for reporting this bug and sending the PR to fix it! I'll review it tomorrow so we can merge it.

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@heitorlessa heitorlessa moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parameters Parameters utility
Projects
Status: Shipped
2 participants