【问题标题】:Can SNS Topic be a source to EventBridge?SNS 主题可以作为 EventBridge 的来源吗?
【发布时间】:2021-05-21 06:12:56
【问题描述】:

快速提问。我计划通过将 SNS 主题作为源传递给 EventBridge,而不是将其通过 Lambda,然后从 EventBridge 传递给 Firehose,从而最大限度地减少资源的使用。我试过了,但它不工作。是否有可能,或者 Lambda 是使其成为来源的唯一方法?

【问题讨论】:

    标签: amazon-web-services lambda amazon-cloudwatch amazon-kinesis-firehose aws-event-bridge


    【解决方案1】:

    不可能。 SNS主题are的唯一有效订阅:

        For the http protocol, the (public) endpoint is a URL beginning with http://.
    
        For the https protocol, the (public) endpoint is a URL beginning with https://.
    
        For the email protocol, the endpoint is an email address.
    
        For the email-json protocol, the endpoint is an email address.
    
        For the sms protocol, the endpoint is a phone number of an SMS-enabled device.
    
        For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue.
    
        For the application protocol, the endpoint is the EndpointArn of a mobile app and device.
    
        For the lambda protocol, the endpoint is the ARN of an AWS Lambda function.
    
        For the firehose protocol, the endpoint is the ARN of an Amazon Kinesis Data Firehose delivery stream.
    

    但是 SNS 可以直接推送到 Firehose,所以也许就这样做吧。

    【讨论】:

    • 哦,好的,知道了。是的,我在 Firehose 上测试了 SNS,似乎可以正常工作。只是我想使用 EventBridge,这样我就可以将它发射到许多目标。我注意到 SNS 可以用作事件源,但尤其是 AWS 事件,而不是发送到特定主题的 SNS 消息对吗?
    • @CharmeeLee 没错。您可以将 SNS 用作 AWS 事件,但不能用于向 EB 发送消息。为此,您需要订阅不支持 EB 的 sns 主题。
    猜你喜欢
    • 2021-03-22
    • 2021-12-28
    • 1970-01-01
    • 1970-01-01
    • 2022-01-27
    • 2018-02-27
    • 1970-01-01
    • 1970-01-01
    • 2014-10-22
    相关资源
    最近更新 更多