AWS 数据管道的 ShellCommandPrecondition 的 return 值应该是多少?

What should be return value from ShellCommandPrecondition of AWS data pipeline?

我正在编写一个 shell 脚本,它应该由 AWS 数据管道的 ShellCommandPrecondition 执行。 AWS 文档没有指定

  1. 脚本中的 return 值应该是多少?
  2. 我可以 return 0 表示成功,如果条件不满足则为 1 或任何其他值吗? AWS 文档说 pipeline runs activity when precondition is true 不确定如何从 shell 脚本
  3. return true
  4. 管道如何处理 return 值?
  5. 管道在什么时间间隔(1 秒、1 分钟、1 小时)重试前置条件执行?

我的任务目标是创建一个管道,该管道应 运行 每月一次,并且仅当此先决条件为真时。

正如评论中所建议的,当执行 ShellCommandPrecondition 提供的脚本时,这必须以成功终止进程结束,即没有错误退出代码。

参考要点1 & 2,如果脚本运行成功,或者你用0作为return代码强制退出,ShellCommandPrecondition 将被假定为 True.

再次根据评论,对于 3rd question,可以使用 retryDelay 参数设置重试之间的延迟。