Automation 和 Command 类型的 AWS Systems Manager 文档之间有什么区别?

What is the difference between an AWS Systems Manager Document of Type Automation and Command?

他们似乎服务于相同的目的。它们都可以分解为步骤,每个步骤都是一个脚本。 命令或自动化文档也可以是状态管理器中 SSM 关联的一部分。 所以我的问题很简单。在哪种情况下我需要创建命令文档而不是自动化文档?

来自文档:

Using Run Command, a capability of AWS Systems Manager, you can remotely and securely manage the configuration of your managed nodes.

因此,使用命令文档,您可以在托管实例上执行命令(即 yum 更新)

Automation, a capability of AWS Systems Manager, simplifies common maintenance, deployment, and remediation tasks for AWS services like Amazon Elastic Compute Cloud (Amazon EC2), Amazon Relational Database Service (Amazon RDS), Amazon Redshift, Amazon Simple Storage Service (Amazon S3), and many more.

使用自动化文档,您可以与任何 AWS 服务交互以执行某些操作(即启动 EC2 实例、从 运行 实例创建 AMI、创建 RDS 快照等) 此外,您可以定义重试、创建过程分支(即,当某些步骤失败时,走与成功时不同的路径)