确认 SNS 订阅者的 HTTP 端点

Confirmation of HTTP endpoint for SNS Subscribers

当我使用云形成创建 SNS 主题并同时配置 HTTP 端点时,HTTP 端点可能当时无法正常工作。

那么是否可以设置在稍后阶段发送这些确认请求的重试。

我的用例是 HTTP 端点将位于我的 EC2 实例之一上,该实例是作为同一 clodformation 的一部分创建的,然后我使用 AWS CodeDeploy 部署我的 web 应用程序。

因此,在 SNS 尝试确认订阅者端点之前,EC2 实例很可能未完全初始化或代码部署未完成

显然,您可以...通过在端点或主题上配置重试策略。

If Amazon SNS doesn't receive a successful response from your endpoint, it attempts to deliver the message again. This applies to all messages, including the subscription confirmation message. By default, if the initial delivery of the message fails, Amazon SNS attempts up to three retries with a delay between failed attempts set at 20 seconds. Note that the message request times out at 15 seconds. This means that if the message delivery failure was caused by a timeout, Amazon SNS will retry approximately 35 seconds after the previous delivery attempt. If you don't like the default delivery policy, you can set a different delivery policy on the endpoint. (emphasis added)

http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html