Skip to content

Bug: get_parameters_by_name ignores transform="auto" for batched parameters #8435

Description

@MohammedAlkindi

get_parameters_by_name(..., transform="auto") returns raw strings for batched parameters. Nothing raises, so the unparsed value reaches caller code silently.

The split shows inside a single call. A decrypt=True parameter routes through BaseProvider.get(), which passes key=name, so auto works. The rest route through SSMProvider._transform_and_cache_get_parameters_response, which calls transform_value() with no key, so the suffix is read from an empty string and auto degrades to the identity transform.

On develop, stubbed client, one call with transform="auto":

decrypt -> BaseProvider.get()   parsed=True   dict  {'value': 'hello'}
batch   -> GetParameters        parsed=False  str   '{"value": "hello"}'
get_parameters_by_name(
    parameters={"/dev/a.json": {}, "/dev/b.json": {"decrypt": True}},
    transform="auto",
)

Fix is key=name in that transform_value() call. #7083 fixed the argument-order bug in the same function and covered transform="json", so auto survived it.

Version: latest. Runtime: Python 3.13. Packaging: PyPi.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions