简体   繁体   English

AWS Step Function 失败时调用 SNS

[英]Calling SNS when AWS Step Function fails

I have implemented a state machine using AWS Step Functions which includes calling some Lambda functions, Spinning EMR cluster, Adding steps to EMR and Terminating EMR cluster.我已经使用 AWS Step Functions 实现了 state 机器,其中包括调用一些 Lambda 函数、旋转 EMR 集群、向 EMR 添加步骤和终止 EMR 集群。 I want to call SNS Topic whenever any of above state fails.每当上述 state 失败时,我想调用 SNS 主题。

You can create a cloudwatch event to capture the stepfunction failure or time out events and add SNS as the target for this rule.您可以创建一个 cloudwatch 事件来捕获 stepfunction 失败或超时事件,并将 SNS 添加为此规则的目标。

to create a cloudwatch rule navigate to cloudwatch -> events -> rules -> create创建 cloudwatch 规则导航到 cloudwatch -> 事件 -> 规则 -> 创建

this rule can be restricted to a specific stepfunction or a specific execution providing the corresponding ARN此规则可以限制为特定 stepfunction 或提供相应 ARN 的特定执行

在此处输入图像描述

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

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