'AWS API Gateway Proxy Resource VPC LINK : Accessing GET Request data in PHP

So I have configured a proxy resource in API Gateway, and set up an 'ANY' method with the integration as a VPC link to an Elastic Beanstalk with an NLB running PHP.

This configuration works, and uses a application/json mapping template to pass through POST data, which I am pulling from php://input. This all works perfectly.

However, whenever I hit this same proxy with a GET request, I am not sure how to access the params, or path, or any information regarding the request, as of course the mapping template is not run because there is no 'Content-Type' header.

The php://input, $_GET, $_REQUEST, are all empty. How can I configure the API Gateway to pass through params, headers, and context info in a GET request? And how do I then access this from PHP?

EDIT: I tried to configure a specific 'GET' method, which then allows me to access params via $_GET, and headers via $_REQUEST, however I don't know if there is a way I can access the 'context', specifically the path and payload from my authorizer. If there is a way to pass that information through, that would also solve my problem.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source