Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.5.0
4.5.1
8 changes: 8 additions & 0 deletions b_lambda_layer_common/util/sfn_call.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import uuid
import zlib
from typing import Any, Dict, Optional, Union
from json.decoder import JSONDecodeError

Expand Down Expand Up @@ -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
Expand Down