diff --git a/zappa/core.py b/zappa/core.py index 2798ae786..4b4be50b6 100644 --- a/zappa/core.py +++ b/zappa/core.py @@ -437,7 +437,12 @@ def create_handler_venv(self): pip_return_code = pip_process.returncode if pip_return_code: - raise EnvironmentError("Pypi lookup failed") + output = pip_process.stdout + if hasattr(output, 'decode'): + output = output.decode('utf-8') + raise EnvironmentError( + "Pypi lookup failed\n{}".format(output) + ) return ve_path @@ -2135,7 +2140,7 @@ def create_stack_template( self, # build a fresh template self.cf_template = troposphere.Template() - self.cf_template.add_description('Automatically generated with Zappa') + self.cf_template.set_description('Automatically generated with Zappa') self.cf_api_resources = [] self.cf_parameters = {} diff --git a/zappa/handler.py b/zappa/handler.py index 78a31cfda..4de71716b 100644 --- a/zappa/handler.py +++ b/zappa/handler.py @@ -7,6 +7,7 @@ import json import logging import os +import shlex import sys import traceback import tarfile @@ -405,7 +406,7 @@ def handler(self, event, context): # Couldn't figure out how to get the value into stdout with StringIO.. # Read the log for now. :[] - management.call_command(*event['manage'].split(' ')) + management.call_command(*shlex.split(event['manage'])) return {} # This is an AWS-event triggered invocation.