You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: get_parameters_by_name returns {} instead of raising when GetParameters fails with raise_on_error=True #8586
get_parameters_by_name(..., raise_on_error=True) (the default) raises GetParameterError when the GetParameters call fails. The docstring says: "Default to fail-fast. Raises GetParameterError upon any error".
Current Behaviour
When GetParameters fails with InvalidKeyId or InternalServerError, the except block in _get_parameters_by_name (ssm.py:633) turns the names into errors, but errors are only surfaced when raise_on_error=False. In fail-fast mode the function returns {} and the Lambda keeps running without its parameters. Same for an all-decrypt batch.
In the except of _get_parameters_by_name_from_batch (and the decrypt variant), if raise_on_error: raise GetParameterError(...) from exc before falling back to the error list. Add a test for both batches. Note for reviewers: code that treated the empty dict as "not found" will now see the exception, which is what the docstring always promised.
Steps to Reproduce
Run the snippet above (it uses botocore.stub.Stubber, no AWS access needed).
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.13
Packaging format used
PyPi
Debugging logs
Warning
This issue is ready to be picked up, by humans or by agents. If you want it, comment here first so we can assign it to you, and please take only one or two issues at a time so others can join in too. The reproduction above runs locally without AWS access. Thanks!
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 reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Activity
leandrodamascena commentedon Oct 19, 2026
Hey @azmi2409 thanks, #8616 is yours. Will review.
fix(parameters): raise GetParameterError when GetParameters fails in …
powertools-for-aws-oss-automation commentedon Oct 22, 2026
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 reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon Oct 28, 2026
This is now released under 3.38.0 version!