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: