简体   繁体   English

AWS-CLI-ec2属性错误

[英]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群集中的S3存储桶中的对象进行交互(我尝试对位于s3:// $ mybucket /中的视频进行ffmpeg处理,我发现我必须添加一个角色并使用这些对象创建群集角色,我的代码如下所示:

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 ! 由于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 ! 现在正在工作,集群已创建并且正在工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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