Skip to content

Instantly share code, notes, and snippets.

@dhwajraj
Last active September 23, 2016 05:01
Show Gist options
  • Save dhwajraj/0ca2651a731c2416b1e15480a590e5ef to your computer and use it in GitHub Desktop.
Save dhwajraj/0ca2651a731c2416b1e15480a590e5ef to your computer and use it in GitHub Desktop.
Creating aws emr Spark cluster using aws-cli
aws emr create-cluster --termination-protected --applications Name=Hadoop Name=Hive Name=Pig Name=Hue Name=Ganglia Name=Spark \
--bootstrap-actions '[{"Path":"s3://config-test/utils/boot_script.sh","Name":"Java and Tensorflow Install boot script"}]' \
--ec2-attributes '{"KeyName":"abcdefgh","InstanceProfile":"EMR_EC2_DefaultRole","ServiceAccessSecurityGroup":"sg-a70038df","SubnetId":"subnet-f993ccd1","EmrManagedSlaveSecurityGroup":"sg-000000","EmrManagedMasterSecurityGroup":"sg-000000"}' \
--service-role EMR_DefaultRole --enable-debugging --release-label emr-4.4.0 \
--log-uri 's3n://aws-logs-00000000-us-east-1/elasticmapreduce/' --name 'Agent' \
--instance-groups '[{"InstanceCount":2,"InstanceGroupType":"CORE","InstanceType":"m4.2xlarge","Name":"Core instance group - 2"}\
,{"InstanceCount":1,"InstanceGroupType":"MASTER","InstanceType":"m4.2xlarge","Name":"Master instance group - 1"}]' \
--region us-east-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment