Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 453
Fab Avatar asked Dec 06 '16 04:12

Fab


People also ask

Why do I get an HTTP 403 Forbidden error when connecting to my API gateway APIs from a VPC?

The HTTP 403 Forbidden error most commonly occurs when private DNS is enabled for an API Gateway interface VPC endpoint that's associated with a VPC. In this scenario, all requests from the VPC to API Gateway APIs resolve to that interface VPC endpoint.

How do I fix 402 forbidden?

Clear Your Browser Cookies and Cache Clearing the cache won't affect your browsing experience much, but some websites may take a couple of extra seconds to load as they re-download all the previously cached data. Clearing cookies means you'll have to sign in again to most websites.

Why am I getting a forbidden error?

The 403 Forbidden error appears when your server denies you permission to access a page on your site. This is mainly caused by a faulty security plugin, a corrupt . htaccess file, or incorrect file permissions on your server.


1 Answers

If you set 'API Key Required' option to true, please check below.

  1. you have to pass 'x-api-key' HTTP Header Parameter to API Gateway.
  2. The API Key had to be created.
  3. In addition, you need to check a Usage Plan for the API Key on API Gateway Console.
like image 113
Daniel Jihoon Oh Avatar answered Sep 27 '22 16:09

Daniel Jihoon Oh