0

I am running a custom alexa skill with flask-ask that connects to aws iot. Using same credentials work when running the script on local machine and using ngrok to assign to Alexa skill endpoint. But when I use zappa to upload as lambda, I get the following:

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

When using ngrok, the skill works completely fine. What am I missing here? Help!

thekindlyone
  • 509
  • 1
  • 6
  • 21

1 Answers1

0

The problem was VPC access. I had to provide the role the VPC access policy and it worked.

thekindlyone
  • 509
  • 1
  • 6
  • 21