[英]How to trigger a ngrok get request in AWS API gateway and Lambda function?
I'm trying to access some GET requests data from a personal ngrok webpage (that i created for testing purposes) by using the aws api gateway. 我正在尝试使用aws api网关从个人ngrok网页(我出于测试目的而创建)访问一些GET请求数据。
When i'm using the integration request i just can't get the data from the ngrok web page. 当我使用集成请求时,我只是无法从ngrok网页获取数据。
What i am trying to do is to catch some data from my ngrok page (by using the Api gateway) and then save them in dynamodb via a lambda function. 我想做的是从ngrok页中捕获一些数据(通过使用Api网关),然后通过lambda函数将它们保存在dynamodb中。 I read the aws docs but i can find something that explains this process. 我阅读了aws文档,但可以找到一些说明此过程的信息。
Thanks for helping. 感谢您的帮助。
One way is, you can have one API GW method that uses a Lambda function as integration endpoint. 一种方法是,您可以有一个使用Lambda函数作为集成端点的API GW方法。 The Lambda function could get the data from ngrok page and save it to Dynamo. Lambda函数可以从ngrok页面获取数据并将其保存到Dynamo。
The other way is, you can have one API GW method with http integration pointing to your ngrok endpoint, and another API GW method with Lambda integration pointing to your Lambda function that puts the data into Dynamo. 另一种方法是,您可以使用一个带有http集成指向ngrok端点的API GW方法,以及另一个带有Lambda集成指向您的Lambda函数的API GW方法,该函数将数据放入Dynamo。 The caller should call the first method, and then call the second method with the output of the first method. 调用方应调用第一个方法,然后使用第一个方法的输出调用第二个方法。 So, the first option is a better one. 因此,第一种选择是更好的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.