简体   繁体   中英

AWS-CLI - Error with ec2-attributes

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

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 !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM