From e5023a4770010a86d4a73b288699acd994d06a08 Mon Sep 17 00:00:00 2001 From: Luke Muther <80649402+lmuther8@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:01:18 -0400 Subject: [PATCH] Update cli.py Expected Behavior The CLI should output that the current AWS user does not have permission to call lambda:GetFunction. Actual Behavior The CLI outputs: Warning! Couldn't get function {{function_name}} in {{AWS Region}} - have you deployed yet?. --- zappa/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zappa/cli.py b/zappa/cli.py index a89f9816a..ad60f5089 100755 --- a/zappa/cli.py +++ b/zappa/cli.py @@ -936,6 +936,10 @@ def update(self, source_zip=None, no_upload=False, docker_image_uri=None): except botocore.exceptions.BotoCoreError as e: click.echo(click.style(type(e).__name__, fg="red") + ": " + e.args[0]) sys.exit(-1) + # https://github.com/zappa/Zappa/issues/1313 + except botocore.exceptions.ClientError as e: + click.echo(click.style(type(e).__name__, fg="red") + ": " + e.args[0]) + sys.exit(-1) except Exception: click.echo( click.style("Warning!", fg="red")