如何在不使用 AWS Pinpoint 或 Twilio 的情况下通过短信实现 Lex 和用户之间的双向通信

How to implement 2-way communication between Lex and a user through text messaging without using AWS Pinpoint or Twilio

我有一个 Lex 机器人,我需要实现一种通过 SMS 与之交谈的方式。我被要求尝试使用 Amazon SNS 使其正常工作。

我了解 Amazon SNS 是一项通知服务。从 Lex 发送消息似乎很简单,就像他们在 this tutorial 中所做的那样。但是,据我了解,AWS SNS 不保存会话,而我的某些 Lex 意图需要保存会话。我也不确定 SNS 如何接收用户的消息。

有没有一种方法可以让 Lex 和用户通过短信进行双向通信?最好使用 Amazon SNS。

Amazon Pinpoint 可能是您在这种情况下寻找的解决方案。

Pinpoint 支持 two-way SMS 并集成到 Amazon 堆栈的其余部分;包括莱克斯。

Here's the link to the documentation and here is a tutorial 这将帮助您一路走来。