[英]How do I invoke AWS Rekognition from a Lambda within a VPC
I am working on a lambda function that needs to access RDS
, S3
and Rekognition
services from AWS. 我正在开发一个需要从AWS访问RDS
, S3
和Rekognition
服务的lambda函数。
I gave S3
and Rekognition
permissions via the AmazonS3FullAccess
and the AmazonRekognitionFullAccess
policies respectively and it worked fine 我分别通过AmazonS3FullAccess
和AmazonRekognitionFullAccess
策略给出了S3
和Rekognition
权限,它运行良好
The thing is that I could not access my Aurora
instance inside RDS
because it's inside a VPC 问题是我无法在RDS
访问我的Aurora
实例,因为它位于VPC内部
I changed my lambda network configurations so it would be able to access the VPC, and the Aurora
connection worked as expected, but then the connection to Rekognition
stopped working, whenever I invoke detectLabels
for example it just hangs. 我更改了我的lambda网络配置,因此它可以访问VPC,并且Aurora
连接按预期工作,但是当我调用detectLabels
时,与Rekognition
的连接停止工作,例如它只是挂起。
Am I missing some permission? 我错过了一些许可吗?
If you have no outside connection then you'll need to create an internet gateway through the VPC via NAT. 如果您没有外部连接,则需要通过VPC通过NAT创建Internet网关。
AWS has documentation for it, and there's a bit more discussion in another StackOverflow question . AWS有它的文档 ,在另一个StackOverflow问题中有更多的讨论。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.