-
Notifications
You must be signed in to change notification settings - Fork 153
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
Feature request: transform: 'json' should return an array for StringList stored in SSM #2041
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @maximang, thank you for opening this issue. Would you be so kind to please provide an example of the data structure you have stored in SSM, its configuration, and the data structure you'd expect after retrieving it and parsing it? This would help us recreate an example and understand better the request. Thank you! |
Hi @dreamorosi, Here is an example of the data structure : /my-application/tenant-id/settings/countries (StringList)
/my-application/tenant-id/settings/credentials (SecureString)
/my-application/tenant-id/settings/features (String)
Powertools usage
Expected output
|
Thank you for providing the examples. I can see how having the My current thought process is that using the If we were to make a change in the current handling, the most appropriate place I can think (for now) is in the logic that retrieves the parameter (here). We could add a special handling in the logic that splits the To be very honest, none of these changes seem correct to me, but none of them is completely off the table. Maybe a better way would be to allow customers to pass their own transform function, so that you'd be able to implement your own behavior if you decide to do so. Before making a decision I'd like to:
|
Circling back here after a few months to update on the issue. From my side, I still agree with the statements in my previous comment - in addition to these, making this change now would also mean making a breaking change since customers might be relying on the current behavior and applying their own transform. I've checked with other versions of Powertools for AWS how they handle this case, and in Python they have the same logic as us - meaning no special treatment for this kind of value. I'll leave the issue open for a few more months, to see if it gains tractions - I still would like to give time to people to find this and share their use cases before deciding if this should be added or not. |
We have discussed this internally and we think it makes sense to make the change since, as a customer when storing a This is however a breaking change with the current behavior so I will add this to our ongoing list of changes that we'll evaluate for the next major release (for which we don't have a committed date yet). |
Use case
StringList stored in SSM are mainly used to store arrays. The first thing people usually do, is splitting the StringList into an array right after having retrieved it from the Parameter Store.
Solution/User Experience
In the Parameters Powertool, when the
transform: 'json'
option is used, automatically transform the StringList into an array.We can also provide an extra transform option value (
transform: 'array'
for example), just made to handle this case. But it would be disappointing for people getting multiple parameters at once, using getMultiple/getParameters.Alternative solutions
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: