如何使用 aws cli 指定多个 bootstrap 操作?

How do I specify multiple bootstrap actions using aws cli?

我正在尝试使用 aws cli 启动 EMR 集群。有两种方法可以在 aws cli 中提供 bootstrap 操作。

  1. 使用JSON,这是我目前正在使用的,但它变得非常混乱,因为所有这些都在bash脚本中并且很难格式化json

  2. 使用他们的列表命令

来自他们的网站:

--bootstrap-actions (list)

Shorthand 语法:

Path=string,Args=string,string,Name=string ...

我可以通过这种方式获得 1 个 bootstrap 操作,但是当我尝试添加第二个操作时,它只执行我最后列出的任何内容

例如:

Path=string,Args=string,string,Name=string,Path=string2,Args=string2,Name=string2

只执行string2。有谁知道正确的格式吗?

它们似乎应该 space 分开

来自 AWS CLI create-cluster 文档的创建 Amazon EMR 集群时添加 bootstrap 操作列表 部分:

aws emr create-cluster --bootstrap-actions Path=s3://mybucket/myscript1,Name=BootstrapAction1,Args=[arg1,arg2] Path=s3://mybucket/myscript2,Name=BootstrapAction2,Args=[arg1,arg2] --release-label emr-4.0.0  --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m3.xlarge InstanceGroupType=CORE,InstanceCount=2,InstanceType=m3.xlarge --auto-terminate