【发布时间】:2021-11-10 03:59:11
【问题描述】:
在使用 Boto3 创建 EMR spark 集群时遇到了一些问题。我得到的错误如下:
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the RunJobFlow operation: Attempted to set bid price for on demand instance group.
我指定这个配置如下:
'Name': 'Core - 2',
'InstanceRole': 'CORE',
'InstanceType': 'i3.2xlarge',
'InstanceCount': 50,
'BidPrice': 'OnDemandPrice',
似乎Boto3 API 不允许这样做,我也不想使用 AWS Cli。是否有通过Boto3 指定 Spot 实例的解决方法?
【问题讨论】:
-
你能分享你当前使用的产生错误的boto3吗?
-
是1.18.41版
-
我的意思是,产生错误的代码。
-
配置太长了。但基本上添加这个 sn-p ``` 'InstanceGroups': [ { 'Name': 'Task', 'InstanceRole': 'TASK', 'InstanceType': 'i3.2xlarge', 'InstanceCount': 1, 'BidPrice ': 'OnDemandPrice' }, ```
-
您可以使用正确格式的代码块更新答案。
标签: python amazon-web-services apache-spark boto3 amazon-emr