How to create EMR cluster using AWS CLI?

0 votes
Can someone help me with the command to create a EMR cluster using AWS CLI? Any help is appreciated.
Feb 26 in AWS by Reshma Bhattacharya
177 views

1 answer to this question.

0 votes

The command to create EMR cluster using AWS CLI is as follows:-

aws emr create-cluster --name "Demo Cluster" --ami-version 5.2 --applications Name=Hive Name=Pig --use-default-roles --ec2-attributes KeyName=YourKey --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m4.large InstanceGroupType=CORE,InstanceCount=2,InstanceType=m4.large --steps Type=PIG,Name="Pig Program",ActionOnFailure=CONTINUE,Args=[-f,s3://mybucket,-p,INPUT=s3://mybucket,-p,OUTPUT=s3://mybucket,$INPUT=s3://mybucket,$OUTPUT=s3://mybucket]

This will create a 2 node cluster 1 master and 1 slave.

Hope this helps.

answered Feb 27 by Priyaj
• 57,300 points

Related Questions In AWS

0 votes
1 answer

How to create a S3 bucket using AWS CLI?

You can use the following command:- C:\Users\priyj_kumar>aws s3api ...READ MORE

answered Feb 15 in AWS by Priyaj
• 57,300 points
1,034 views
0 votes
1 answer

How to create a VPC using AWS CLI?

To create an Amazon VPC using AWS ...READ MORE

answered Feb 21 in AWS by Priyaj
• 57,300 points
115 views
0 votes
1 answer
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer

How to create a EMR Cluster using Java AWS SDK?

The Java code for creating an EMR ...READ MORE

answered Feb 27 in AWS by Priyaj
• 57,300 points
189 views