Reputation: 21
i'm trying to interact with an object in my S3 bucket from my EMR Cluster (i'm trying to ffmpeg a video located in s3://$mybucket/ I found that i have to add a role and create my cluster using these roles, my code is looks like that :
EMR_CLUSTER_CREATION=$(aws emr create-cluster --name $cluster_name --release-label emr-5.4.0 --log-uri s3://$bucket_name/myLogs --applications Name=Hive Name=Pig \
--service-role Proton-Test \
--ec2-attributes KeyName=$ec2_key, InstanceProfile=Proton-Test --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m3.xlarge InstanceGroupType=CORE,InstanceCount=2,InstanceType=m3.xlarge)
echo "$EMR_CLUSTER_CREATION"
But i get this error :
Error parsing parameter '--ec2-attributes': Expected: '<second>', received: '<none>' for input:
KeyName=devenv-key,
^
Thanks in advance !
Alex
Upvotes: 0
Views: 417
Reputation: 21
The problem was the synthax, thanks to Sudharsan Sivasankaran !
EMR_CLUSTER_CREATION=$(aws emr create-cluster --name $cluster_name --release-label emr-5.4.0 --log-uri s3://$bucket_name/myLogs --applications Name=Hive Name=Pig \
--service-role Proton-Test \
--ec2-attributes KeyName=$ec2_key,InstanceProfile=Proton-Test --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m3.xlarge InstanceGroupType=CORE,InstanceCount=2,InstanceType=m3.xlarge)
echo "$EMR_CLUSTER_CREATION"
is now working, cluster created and working !
Upvotes: 2