Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify multiple bootstrap actions using aws cli?

I am trying to launch an EMR cluster using aws cli. There are 2 ways to give bootstrap actions in aws cli.

  1. Use JSON, this is what I am currently using, but its getting very messy because all this is in a bash script and its difficult to format the json

  2. Use their list commands

From their website:

--bootstrap-actions (list)

Shorthand Syntax:

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

I am able to get 1 bootstrap action doing this way, but when I try to add a second one, it only executes whatever I list last

For example:

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

Only string2 gets executed. Does anyone know the proper format for this?

like image 840
Instinct Avatar asked Apr 28 '16 21:04

Instinct


1 Answers

It appears they should be space-separated.

From the Add a list of bootstrap actions when creating an Amazon EMR Cluster section of the AWS CLI create-cluster documentation:

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
like image 102
John Rotenstein Avatar answered Oct 31 '22 19:10

John Rotenstein