getting message: forbidden reply from AWS API gateway

前端 未结 20 1072
鱼传尺愫
鱼传尺愫 2020-11-30 04:34

I am trying to create a lambda service on AWS and have it accessed from outside via the API gateway with no authentication or restriction required.

To make things ea

相关标签:
20条回答
  • 2020-11-30 05:16

    If Authorization and API KEY Required both are set to true for the method, then make sure you have the following Headers while sending the request:

    1. Content-Type (usually application/x-www-form-urlencoded if GET call)
    2. HOST
    3. X-Amz-Date
    4. Authorization
    5. x-api-key

    I use POSTMAN for API testing which is quite reliable and then it's preety straight forward.

    Note: Do not add x-api key header if you have set API KEY REQUIRED as FALSE. And if you have set AUTHORIZATION as FALSE then do not add Authorization header.

    0 讨论(0)
  • 2020-11-30 05:16

    Putting my experience over here as well. I tried all those things above and it turned out that putting the domain with a wildcard solved my {"message":"Forbidden"} issue: *.mydomain.com

    0 讨论(0)
提交回复
热议问题