getting message: forbidden reply from AWS API gateway

前端 未结 20 1120
鱼传尺愫
鱼传尺愫 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:15

    There are a few things to do when we receive the {message: forbidden} in the API Gateway:

    CORS enabled?

    1. Check if CORS is Enabled within the API ( to start with, allow the origin '*', to make sure we can test safely )
    2. Deploy the API to make sure all settings are as expected

    API Key enabled?

    1. Check if we have the API Key enabled in the API Gateway
    2. Check if there is an API Key configured.
    3. Check if your API Key is assigned to the correct usageplan and add an API Stage, without the API Stage you will always receive an {message: forbidden}

    If you are still facing issues, let me know so me or one of our cloud gurus @levarne can help.

提交回复
热议问题