From 28aa6ee659e06856cbe9a77740d90687dfccdda5 Mon Sep 17 00:00:00 2001 From: Suriya Subramanian Date: Sun, 18 Jul 2021 07:02:20 +0000 Subject: [PATCH 1/2] Skip loading credentials for save-python-settings-file Loading AWS Credentials and creating AWS Client classes take a lot of time. We do not need to do that for the save-python-settings-file command. --- zappa/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zappa/cli.py b/zappa/cli.py index 44f462753..2dd048e73 100755 --- a/zappa/cli.py +++ b/zappa/cli.py @@ -543,7 +543,7 @@ def positive_int(s): else: self.stage_env = self.vargs.get("stage_env") - if args.command == "package": + if args.command in ["package", "save-python-settings-file"]: self.load_credentials = False self.command = args.command From ed5a63bb70020a1666b2fd041ed3602e54228886 Mon Sep 17 00:00:00 2001 From: monkut Date: Thu, 19 Oct 2023 13:17:11 +0900 Subject: [PATCH 2/2] change list to tuple (list unnecessary) --- zappa/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zappa/cli.py b/zappa/cli.py index 552a971ae..c794c5140 100755 --- a/zappa/cli.py +++ b/zappa/cli.py @@ -474,7 +474,7 @@ def positive_int(s): else: self.stage_env = self.vargs.get("stage_env") - if args.command in ["package", "save-python-settings-file"]: + if args.command in ("package", "save-python-settings-file"): self.load_credentials = False self.command = args.command