I am trying to launch an EMR cluster using aws cli. There are 2 ways to give bootstrap actions in aws cli.
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
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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With