尝试运行zappa deploy
并收到错误消息:
==============
Traceback (most recent call last):
File "/var/venv/lib/python3.6/site-packages/zappa/cli.py", line 747, in deploy
function_name=self.lambda_name)
File "/var/venv/lib/python3.6/site-packages/zappa/core.py", line 1238, in get_lambda_function
FunctionName=function_name)
File "/var/venv/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/venv/lib/python3.6/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the GetFunction operation: Function not found: arn:aws:lambda:us-east-1:020377937554:function:gooten-nope-dev
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/venv/lib/python3.6/site-packages/zappa/cli.py", line 2712, in handle
sys.exit(cli.handle())
File "/var/venv/lib/python3.6/site-packages/zappa/cli.py", line 509, in handle
self.dispatch_command(self.command, stage)
File "/var/venv/lib/python3.6/site-packages/zappa/cli.py", line 546, in dispatch_command
self.deploy(self.vargs['zip'])
File "/var/venv/lib/python3.6/site-packages/zappa/cli.py", line 777, in deploy
self.lambda_arn = self.zappa.create_lambda_function(**kwargs)
File "/var/venv/lib/python3.6/site-packages/zappa/core.py", line 1046, in create_lambda_function
self.get_credentials_arn()
File "/var/venv/lib/python3.6/site-packages/zappa/core.py", line 2265, in get_credentials_arn
self.credentials_arn = role.arn
File "/var/venv/lib/python3.6/site-packages/boto3/resources/factory.py", line 339, in property_loader
self.load()
File "/var/venv/lib/python3.6/site-packages/boto3/resources/factory.py", line 505, in do_action
response = action(self, *args, **kwargs)
File "/var/venv/lib/python3.6/site-packages/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(**params)
File "/var/venv/lib/python3.6/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/venv/lib/python3.6/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.NoSuchEntityException: An error occurred (NoSuchEntity) when calling the GetRole operation: The role with name gooten-nope-dev-ZappaLambdaExecutionRole cannot be found.
==============
答案 0 :(得分:1)
必须从我的manage_roles: false
中删除zappa_settings.json