diff --git a/VERSION b/VERSION index a84947d..4404a17 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.5.0 +4.5.1 diff --git a/b_lambda_layer_common/util/sfn_call.py b/b_lambda_layer_common/util/sfn_call.py index 643934a..ae60026 100644 --- a/b_lambda_layer_common/util/sfn_call.py +++ b/b_lambda_layer_common/util/sfn_call.py @@ -1,5 +1,6 @@ import json import uuid +import zlib from typing import Any, Dict, Optional, Union from json.decoder import JSONDecodeError @@ -39,9 +40,16 @@ def call(self, data: Dict[Any, Any]) -> Union[str, Dict[str, Any]]: ) output = json.loads(response.get('output', {})) + # Add http-like handling that does not break anything. output = self.__http_like_handling(output) + # If the output is compressed, decompress it. + if output.get('compressed'): + compressed_value: str = output['value'] + + output = json.loads(zlib.decompress(bytes.fromhex(compressed_value))) + return output @staticmethod