Using AWS-Cli to create EMR cluster

less than 1 minute read

Here we will create an EMR cluster with 1 Master and 2 Core instances

aws emr create-cluster can be used to start an EMR cluster. There are a few parameters which are essential to use this command. All of those parameters have been used below.

$ aws emr create-cluster --release-label emr-4.1.0 --name "$dir" --auto-terminate --use-default-roles --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m3.xlarge InstanceGroupType=CORE,InstanceCount=2,InstanceType=m3.xlarge --enable-debugging --log-uri s3:///"$dir"/logs --steps file://steps.json

The steps argument provides the steps that are supposed to be executed on this EMR cluster in the form of a json file like this one.