【发布时间】:2016-12-20 05:46:14
【问题描述】:
我正在尝试使用 boto3 来启动这样的 EMR 集群:
client = boto3.client('emr')
client.run_job_flow(**kwargs)
我收到此错误:
ClientError: An error occurred (ValidationException) when calling the
RunJobFlow operation: InstanceProfile is required for creating cluster.
(这是 Python 3.5 上的 boto3 版本 1.4.2。)
http://boto3.readthedocs.io/en/latest/reference/services/emr.html?highlight=emr#EMR.Client.run_job_flow 没有提及 InstanceProfile 属性。
我已经尝试了我的(工作)aws cli 脚本中的参数:
--ec2-attributes '{"KeyName":"MyKeyPair",
"InstanceProfile":"EMR_EC2_DefaultRole",
"AvailabilityZone":"us-east-1c",
"EmrManagedSlaveSecurityGroup":"sg-7c753416",
"EmrManagedMasterSecurityGroup":"sg-7e753414"}'
....在 kwargs 的不同位置添加 arg,但没有运气。
谁能给我一个提示或展示一个工作示例?
任何帮助表示赞赏。
【问题讨论】:
标签: boto3