AWS Lambda可以与外部Internet服务对话吗? [英] Can AWS Lambda Speak to external Internet Services?
问题描述
借助AWS开创性的,革命性的,完全托管的功能性编程支持; AWS Lambda可以与外部Internet/系统进行外部通信吗?
With the ground breaking revolutionary fully managed functional programming support by AWS; can AWS lambda speak to external internet / systems for external communication.
想法/动机是,如果AWS Lambda使用NodeJS SDK来服务PubNub,Pusher服务-最好卸载实时通信的处理程序方面.
The idea / motive is if AWS Lambda use the NodeJS SDK for services PubNub, Pusher - it would be nice to offload the handler aspect of the real time communication.
推荐答案
简短的回答是.由于Lambda在Node沙箱中运行,因此没有什么可以阻止您捆绑请求之类的东西并在您的函数中使用它.但是,有一些限制要考虑:
The short answer is yes. Since Lambda runs in a Node sandbox, there's nothing stopping you from bundling up something like request and using it from within your function. However, there are a few limitations to consider:
- 执行的硬上限为60秒,因此,如果您的请求花费的时间太长,则函数可能会超时
-
Lambda对网络功能设置了一些限制:
- There is a hard upper limit of 60 seconds for execution, so if your requests take too long your function could timeout
Lambda places some restrictions on network capabilities:
入站网络连接由AWS Lambda(仅TCP/IP)管理 支持套接字,并且支持ptrace(调试)系统调用 受限制的.
Inbound network connections are managed by AWS Lambda, only TCP/IP sockets are supported, and ptrace (debugging) system calls are restricted.
这篇关于AWS Lambda可以与外部Internet服务对话吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!