diff --git a/zappa/cli.py b/zappa/cli.py index dfc53b5c1..a684e07fa 100644 --- a/zappa/cli.py +++ b/zappa/cli.py @@ -449,8 +449,8 @@ def create_package(self): self.zip_path = self.zappa.create_lambda_zip( self.lambda_name, handler_file=handler_file, - use_precompiled_packages=self.zappa_settings.get('use_precompiled_packages', True), - exclude=self.zappa_settings.get('exclude', []) + use_precompiled_packages=self.zappa_settings[self.api_stage].get('use_precompiled_packages', True), + exclude=self.zappa_settings[self.api_stage].get('exclude', []) ) # Throw our setings into it @@ -549,4 +549,4 @@ def handle(): # pragma: no cover print(e) if __name__ == '__main__': # pragma: no cover - handle() \ No newline at end of file + handle()