getting message: forbidden reply from AWS API gateway
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 easy I set the gateway for now to be a Mock.
On the Get method of the API, the Authorization is set to None
and the API Key is not required
.
When I try this, I get {"message":"Forbidden"}
(same message if I connect it to the actual lambda service).
Any advice on how to make it accessible?
Solution 1:
If you set 'API Key Required' option to true, please check below.
- you have to pass 'x-api-key' HTTP Header Parameter to API Gateway.
- The API Key had to be created.
- In addition, you need to check a Usage Plan for the API Key on API Gateway Console.
Solution 2:
On the API Gateway dashboard choose Resources, click Actions and choose Deploy API. Before your first deployment the only response you'll get is the {"message":"Forbidden"}
.