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: non-UTF-8 SecretBinary with transform='binary' or 'auto' raises UnicodeDecodeError instead of TransformParameterError #8600
A transform failure raises TransformParameterError, or returns None when raise_on_transform_error=False, as documented. With transform="auto" and a name whose suffix does not match, the value is returned as-is.
Current Behaviour
BaseProvider.transform_value (base.py:328) decodes bytes to str before entering the try block, so a SecretBinary that is not valid UTF-8 leaks a raw UnicodeDecodeError from the transform, including with transform="auto" on a .bin name where no transform should run at all.
Move the decode inside the try, and skip it when the resolved transform is the identity (auto with a non-matching suffix).
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!
I'd like to work on this issue with OpenAI Codex assistance. I'll reproduce the invalid UTF-8 and auto/identity cases locally, add regression coverage, and run the relevant validation before submitting a PR. This is the only Powertools issue I am taking.
Hey pls go aheadSent from my iPhoneOn 18 Oct 2026, at 13:19, Oikantik Basu ***@***.***> wrote:Golden007-prog left a comment (aws-powertools/powertools-lambda-python#8600)
I'd like to work on this issue with OpenAI Codex assistance. I'll reproduce the invalid UTF-8 and auto/identity cases locally, add regression coverage, and run the relevant validation before submitting a PR. This is the only Powertools issue I am taking.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
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
Golden007-prog commentedon Oct 18, 2026
I'd like to work on this issue with OpenAI Codex assistance. I'll reproduce the invalid UTF-8 and auto/identity cases locally, add regression coverage, and run the relevant validation before submitting a PR. This is the only Powertools issue I am taking.
leandrodamascena commentedon Oct 18, 2026
powertools-for-aws-oss-automation commentedon Oct 29, 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.