简体   繁体   English

如何在AWS API网关和Lambda函数中触发ngrok获取请求?

[英]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.

相关问题 用于SOAP / REST转换的AWS API Gateway和Lambda函数 - AWS API Gateway & Lambda Function for SOAP / REST Conversion 如何将参数嵌入到 AWS Lambda GET 请求中? - How to embed parameters into AWS Lambda GET request? AWS Lambda / API网关上的文件编码问题 - Encoding issue with file on AWS Lambda/API Gateway 如何在现有 AWS API 网关集成请求中添加标头 - How to add headers in existing AWS API gateway integration request How do I link a DynamoDB, Lambda Function, or Gateway API to an external API with a POST function? - How do I link a DynamoDB, Lambda Function, or Gateway API to an external API with a POST function? Amazon API Gateway和AWS Lambda中的错误处理模式 - Error handling patterns in Amazon API Gateway and AWS Lambda AWS Lambda和API网关-500来自浏览器,但不是来自curl - AWS Lambda & API Gateway - 500 from browser but not from curl 根据GET请求触发API中具体的python function - Trigger specific python function in API based on GET request 如何创建一个链接,该链接向AWS API Gateway发出PUT / POST请求以更新DynamoDB中的项目? - How to create a link that makes a PUT/POST request to AWS API Gateway to update an item in DynamoDB? 如何将URL查询字符串参数映射到AWS API Gateway中的请求标头 - How to map URL Query String Parameter to a request header in AWS API Gateway
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM