From 135313b3637db039e2ff451675a5ee7e71b0861b Mon Sep 17 00:00:00 2001 From: Joel Balcaen Date: Fri, 26 Apr 2024 09:00:22 -0300 Subject: [PATCH] serialize response --- lambdas/bedrock_invoker/src/index.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lambdas/bedrock_invoker/src/index.py b/lambdas/bedrock_invoker/src/index.py index 5500360..3dbce24 100644 --- a/lambdas/bedrock_invoker/src/index.py +++ b/lambdas/bedrock_invoker/src/index.py @@ -75,7 +75,9 @@ def lambda_handler(event, context): 'body': str(e) } + response_body = response['Body'].read().decode('utf-8') + return { 'statusCode': 200, - 'body': response + 'body': response_body }