From 39a57195a279e0566a8ef68da53464578299c5d4 Mon Sep 17 00:00:00 2001 From: Hugo Lopes Tavares Date: Tue, 16 Feb 2016 17:38:39 -0500 Subject: [PATCH] [lambda] Make JSON load python 3-compatible --- moto/awslambda/responses.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moto/awslambda/responses.py b/moto/awslambda/responses.py index 73f969890..6f4f76c0f 100644 --- a/moto/awslambda/responses.py +++ b/moto/awslambda/responses.py @@ -37,8 +37,7 @@ class LambdaResponse(BaseResponse): def _create_function(self, request, full_url, headers): lambda_backend = self.get_lambda_backend(full_url) - - spec = json.loads(request.body) + spec = json.loads(request.body.decode('utf-8')) try: fn = lambda_backend.create_function(spec) except ValueError as e: