我正在使用连接到aws iot的flask-ask运行一个自定义alexa技能。在本地计算机上运行脚本并使用ngrok分配给Alexa技能端点时,可以使用相同的凭据。但是当我使用zappa作为lambda上传时,我得到了以下结果:
File "/var/task/main.py", line 48, in get_shadow
res=client.get_thing_shadow(thingName="test_light")
File "/var/runtime/botocore/client.py", line 253, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/runtime/botocore/client.py", line 543, in _make_api_call
raise error_class(parsed_response, operation_name)
ClientError: An error occurred (ForbiddenException) when calling the GetThingShadow operation: Forbidden当使用ngrok时,该技能工作得非常好。这里我漏掉了什么?帮助!
发布于 2017-01-28 05:39:15
问题出在VPC访问上。我必须提供VPC访问策略的角色,它起作用了。
https://stackoverflow.com/questions/41885825
复制相似问题