使用Zappa在烧瓶应用部署中的错误



我在Zappa中非常新。目前,我正在尝试使用Zappa部署烧瓶项目。

部署烧瓶应用程序时,我会收到此错误

Traceback (most recent call last):
  File "c:userstanvirvirenvfordeploymentenvlibsite-packageszappacli.py", line 1847, in handle
    sys.exit(cli.handle())
  File "c:userstanvirvirenvfordeploymentenvlibsite-packageszappacli.py", line 345, in handle
    self.dispatch_command(self.command, environment)
  File "c:userstanvirvirenvfordeploymentenvlibsite-packageszappacli.py", line 379, in dispatch_command
    self.update()
  File "c:userstanvirvirenvfordeploymentenvlibsite-packageszappacli.py", line 605, in update
    endpoint_url = self.deploy_api_gateway(api_id)
  File "c:userstanvirvirenvfordeploymentenvlibsite-packageszappacli.py", line 1816, in deploy_api_gateway
    cloudwatch_metrics_enabled=self.zappa_settings[self.api_stage].get('cloudwatch_metrics_enabled', False),
  File "c:userstanvirvirenvfordeploymentenvlibsite-packageszappazappa.py", line 1014, in deploy_api_gateway
    variables=variables or {}
  File "c:userstanvirvirenvfordeploymentenvlibsite-packagesbotocoreclient.py", line 251, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "c:userstanvirvirenvfordeploymentenvlibsite-packagesbotocoreclient.py", line 513, in _make_api_call
    api_params, operation_model, context=request_context)
  File "c:userstanvirvirenvfordeploymentenvlibsite-packagesbotocoreclient.py", line 566, in _convert_to_request_dict
    api_params, operation_model)
  File "c:userstanvirvirenvfordeploymentenvlibsite-packagesbotocorevalidate.py", line 270, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
ParamValidationError: Parameter validation failed:
Invalid type for parameter restApiId, value: None, type: <type 'NoneType'>, valid types: <type 'basestring'>

有人知道为什么这个错误即将到来或如何解决此问题?

我对zappa不了解,但是错误消息明显说明了您的问题:

Invalid type for parameter restApiId, value: None, type: <type 'NoneType'>, valid types: <type 'basestring'>

在我看来,您尚未设置参数restApiId,该参数应包含类型basestring的值。我不确定该参数是什么,但似乎必须使用AWS-CLI做某事。

在您的AWS CLI中,请确保您使用为Zappa函数创建的IAM,然后按照AWS配置Q&amp; a for Access键,秘密键和区域。-sask-skills-with-with-zappa我真的希望这很有帮助。

相关内容

  • 没有找到相关文章

最新更新