ERROR skill.index.handler.error: HTTP Error 403: Forbidden
An error occurred during JSON serialization of response: <HTTPError 403: 'Forbidden'> is not JSON serializable
Traceback (most recent call last):
File "/var/lang/lib/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/var/lang/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/var/lang/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/var/runtime/awslambda/bootstrap.py", line 134, in decimal_serializer
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <HTTPError 403: 'Forbidden'> is not JSON serializable
Following the breadcrumbs, as the SampleSkillAdaptor lambda, simply passes on the directive to an API https://######.execute-api.us-east-1.amazonaws.com/prod/directives, which in turn talks to the SampleEndPointAdaptor lambda, I see that it receives the original directive correctly in its body :-)
All good so far...
Debugging the code further I discover that it fails when it gets to following code in the SampleEndPointAdaptor lambda
# Get the API ID, Client ID, and Client Secret
env_api_id = os.environ.get('api_id', None)
env_client_id = os.environ.get('client_id', None)
env_client_secret = os.environ.get('client_secret', None)
It is expecting to have the client_id and client_secret as its local environment variables!!!
doh!! This means, I did not complete [step 6.1] correctly and ended up updating the local environment variables in the front end SampleSkillAdaptor lambda instead of the SampleEndPointAdaptor lambda.
I thought I would share this if anyone else made the same mistake I made...
Was not able to account link - got this error
Looking at the logs from the SampleSkillAdaptor lambda, I see that it receives the following directive, which looks correct. `{
}`
The return response shows the following error:
Following the breadcrumbs, as the SampleSkillAdaptor lambda, simply passes on the directive to an API https://######.execute-api.us-east-1.amazonaws.com/prod/directives, which in turn talks to the SampleEndPointAdaptor lambda, I see that it receives the original directive correctly in its body :-)
All good so far...
Debugging the code further I discover that it fails when it gets to following code in the SampleEndPointAdaptor lambda
It is expecting to have the client_id and client_secret as its local environment variables!!!
doh!! This means, I did not complete [step 6.1] correctly and ended up updating the local environment variables in the front end SampleSkillAdaptor lambda instead of the SampleEndPointAdaptor lambda.
I thought I would share this if anyone else made the same mistake I made...