AWS API Gateway Custom Authorizer AuthorizerConfigurationException

前端 未结 4 406
天涯浪人
天涯浪人 2021-01-11 17:12

For a Kinesis stream, I created a proxy API using AWS API Gateway. I added a custom authorizer using python Lambda for the proxy. After publish of lambda function and deploy

4条回答
  •  爱一瞬间的悲伤
    2021-01-11 18:15

    Figured out what was causing the issue. From python lambda function, I was returning a json string instance. Instead it should be json object. Its strange that the same lambda function did not error when I tested the API from API Gateway "test" feature. But when the API was called from internet (curl or chrome) it failed.

    #return policy_string ... this is incorrect.
    return json.loads(policy_string)
    

提交回复
热议问题