Bug: transform not handling base64/binary values correctly #1325
Labels
bug
Something isn't working
completed
This item is complete and has been merged/shipped
parameters
This item relates to the Parameters Utility
Milestone
Expected Behaviour
Based on the discussion had in aws-powertools/powertools-lambda-python#1796 when working with AppConfig, the transforms JSON & binary should respectively return an object and a string, i.e.
when retrieved with
await getAppConfig('my-feature-flag', { transform: 'json' });
, should return:while:
when retrieved with
await getAppConfig('my-feature-flag', { transform: 'binary' });
, should returntest
.Essentially, the provider and transformer should transparently handle the fact that AppConfig always returns an
Uint8Array
and subsequently apply the transform when one is provided.Current Behaviour
Currently the transformer would decode the binary only when
transform: "binary"
is specified and when doing so it would skip the base64 decoding.This would also result in never being able to use the JSON transform because when attempting to parse the JSON the value was still a binary.
Code snippet
Possible Solution
No response
Steps to Reproduce
See above as well as linked discussion/isssue.
AWS Lambda Powertools for TypeScript version
latest
AWS Lambda function runtime
18.x
Packaging format used
Npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: