简体   繁体   English

到lambda到rds的亚马逊API网关?

[英]Amazon API Gateway to lambda to rds?

I am trying to have a mobile app access an amazon rds postgres instance. 我想让移动应用程序访问亚马逊rds postgres实例。 Referencing https://stackoverflow.com/questions/36103629/is-it-posible-to-query-an-amazon-rds-instance-directly-from-api-gateway# = , Mark said "You should look into pointing API Gateway at a Lambda function that has the ability to connect to your RDS database and run queries." 参考https://stackoverflow.com/questions/36103629/is-it-posible-to-query-an-amazon-rds-instance-directly-from-api-gateway# = ,Mark说:“你应该研究指向API Lambda函数的网关,能够连接到RDS数据库并运行查询。“ So my question is could I implement this approach using this link: http://docs.aws.amazon.com/lambda/latest/dg/vpc-rds.html and then using api gateway to point at that lambda function? 所以我的问题是我可以使用以下链接实现此方法: http//docs.aws.amazon.com/lambda/latest/dg/vpc-rds.html然后使用api网关指向该lambda函数? Then any mobile client with credentials from cognito would be able to call that api? 然后任何拥有来自cognito的凭据的移动客户端都可以调用该API吗? Am I correct and is this the best way? 我是对的,这是最好的方法吗? My worries is that since a VPC is involved, only a small number of people will be able to use the lambda function. 我担心的是,由于涉及VPC,只有少数人能够使用lambda函数。

Yes you could use the technique listed in your link (which is exactly what I was referring to in my other answer that you reference) and then expose that Lambda function via API Gateway. 是的,您可以使用链接中列出的技术(这正是我在您引用的其他答案中所指的那样),然后通过API网关公开该Lambda函数。 This is (one of ) the correct ways to accompolish this. 这是(其中一种)正确的方法。

My worries is that since a VPC is involved, only a small number of people will be able to use the lambda function. 我担心的是,由于涉及VPC,只有少数人能够使用lambda函数。

I don't understand what you are saying here. 我不明白你在这说什么。 Why would use of a VPC restrict the number of people that could use the Lambda function? 为什么使用VPC会限制可以使用Lambda函数的人数?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM