简体   繁体   English

在AWS Lambda上部署Hubot?

[英]Deploy Hubot on AWS Lambda?

I'm a noob using Hubot, so please bear with me. 我是使用Hubot的菜鸟,所以请耐心等待。

I was going through Hubot's documentation ( https://hubot.github.com/docs/deploying/ ) and saw that we can deploy to Heroku, Unix systems and others. 我正在浏览Hubot的文档( https://hubot.github.com/docs/deploying/ ),看到我们可以部署到Heroku,Unix系统和其他系统。

May I know how can Hubot be deployed on AWS Lambda ? 我可以知道如何在AWS Lambda上部署Hubot吗?

Best Regards. 最好的祝福。

I was wondering the same thing. 我想知道同样的事情。 I think the answer is probably "yes, if your chat system can send you http when traffic happens". 我认为答案可能是“是的,如果您的聊天系统可以在流量发生时向您发送http”。 I think Lambda is probably a great choice, since each message in chat is an event to process according to the rules that your bot has. 我认为Lambda可能是一个很好的选择,因为聊天中的每条消息都是根据机器人规则处理的事件。 So, the Lambda function invocation model is a good fit - lots of tiny invokes. 因此,Lambda函数调用模型非常适合 - 许多微小的调用。 You might, though, want to filter the traffic that gets to the function, though, if your chat system is high-traffic. 但是,如果您的聊天系统流量很大,您可能希望过滤到该功能的流量。

For example Slack's Events API lets you subscribe to all of the things you might need the bot to see, I think. 例如, Slack的事件API允许您订阅您可能需要机器人看到的所有内容。 You'd then need to route those requests to your lambda function, which you could do via AWS API Gateway. 然后,您需要将这些请求路由到lambda函数,您可以通过AWS API Gateway执行此操作。

The existing hubot-slack adapter uses the Real-Time Messaging API, though, so you'd need to write your own adaptor for the Events API http that the API Gateway receives. 但是,现有的hubot-slack适配器使用实时消息传递API,因此您需要为API网关接收的事件API http编写自己的适配器。

The same approach (and requirement) applies to other chat systems. 相同的方法(和要求)适用于其他聊天系统。

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

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