AWS 实例队列的投标价格
Bid Price in AWS Instance Fleets
我正在通过 boto3 run_job_flow() 使用实例队列来创建 aws 集群。我不断收到此错误:
ClientError: An error occurred (ValidationException) when calling the RunJobFlow operation: The bid price is invalid. Revise the configuration and resubmit.
我不知道它不喜欢 my_bid_price 变量的什么地方。我试过提交 0.50
或 OnDemandPrice
- 都作为字符串。还尝试将 0.50
作为浮点数。 None 这些作品。但是,当我从字典中完全删除 BidPrice 键时,它会提交为 OnDemandPrice。
我正在使用 boto3 1.12.28 和 botocore 1.22.5。
我错过了什么?我已经简化了我传递的字典,但它仍然产生相同的错误:
config = {
'Applications': [],
'BootstrapActions': [
{
'Name': 'bootstrap',
'ScriptBootstrapAction': {
'Path': my_bootstrap_path
}
}
],
'Configurations': [
{
'Classification': 'emrfs-site',
'Properties': {
'fs.s3.enableServerSideEncryption': 'true'
},
'Configurations': []
},
{
'Classification': 'spark-env',
'Configurations': [
{
'Classification': 'export',
'Properties': {
'PYSPARK_PYTHON': '/usr/bin/python3'
}
}
]
}
],
'Instances': {
'Ec2SubnetIds': my_emr_subnet_ids,
'EmrManagedMasterSecurityGroup': my_emr_master_sg,
'EmrManagedSlaveSecurityGroup': my_emr_node_sg,
'InstanceFleets': [
{
'Name': 'My Master Node',
'InstanceFleetType': 'MASTER',
'InstanceTypeConfigs': [
{
'BidPrice': my_bid_price,
'EbsConfiguration': {
'EbsBlockDeviceConfigs': [
{
'VolumeSpecification': {
'SizeInGB': my_core_ebs_size,
'VolumeType': my_core_ebs_volume_type
},
'VolumesPerInstance': my_core_ebs_volumes
}
],
'EbsOptimized': True
},
'InstanceType': my_master_instance_type,
'WeightedCapacity': 1
}
],
'TargetOnDemandCapacity': 1
},
{
'Name': 'My Core Node',
'InstanceFleetType': 'CORE',
'InstanceTypeConfigs': [
{
'BidPrice': my_bid_price,
'EbsConfiguration': {
'EbsBlockDeviceConfigs': [
{
'VolumeSpecification': {
'SizeInGB': my_core_ebs_size,
'VolumeType': my_core_ebs_volume_type
},
'VolumesPerInstance': my_core_ebs_volumes
}
],
'EbsOptimized': True
},
'InstanceType': my_core_node_instance_type,
'WeightedCapacity': 1
}
],
'TargetSpotCapacity': my_num_core_nodes
}
],
'KeepJobFlowAliveWhenNoSteps': my_keep_alive,
'ServiceAccessSecurityGroup': my_emr_access_sg,
},
'JobFlowRole': 'MyJobFlowRole',
'LogUri': my_log_uri,
'Name': my_cluster_name,
'ReleaseLabel': my_release_label,
'ServiceRole': 'MyRole',
'StepConcurrencyLevel': my_step_concurrency,
'Tags': [],
'VisibleToAllUsers': True
}
为了让它工作,我需要在提交具有按需定价的队列时删除 bid_price
键。我正在传递字符串 OnDemandPrice
作为 bid_price
键的值,boto3 不喜欢它。
我正在通过 boto3 run_job_flow() 使用实例队列来创建 aws 集群。我不断收到此错误:
ClientError: An error occurred (ValidationException) when calling the RunJobFlow operation: The bid price is invalid. Revise the configuration and resubmit.
我不知道它不喜欢 my_bid_price 变量的什么地方。我试过提交 0.50
或 OnDemandPrice
- 都作为字符串。还尝试将 0.50
作为浮点数。 None 这些作品。但是,当我从字典中完全删除 BidPrice 键时,它会提交为 OnDemandPrice。
我正在使用 boto3 1.12.28 和 botocore 1.22.5。
我错过了什么?我已经简化了我传递的字典,但它仍然产生相同的错误:
config = {
'Applications': [],
'BootstrapActions': [
{
'Name': 'bootstrap',
'ScriptBootstrapAction': {
'Path': my_bootstrap_path
}
}
],
'Configurations': [
{
'Classification': 'emrfs-site',
'Properties': {
'fs.s3.enableServerSideEncryption': 'true'
},
'Configurations': []
},
{
'Classification': 'spark-env',
'Configurations': [
{
'Classification': 'export',
'Properties': {
'PYSPARK_PYTHON': '/usr/bin/python3'
}
}
]
}
],
'Instances': {
'Ec2SubnetIds': my_emr_subnet_ids,
'EmrManagedMasterSecurityGroup': my_emr_master_sg,
'EmrManagedSlaveSecurityGroup': my_emr_node_sg,
'InstanceFleets': [
{
'Name': 'My Master Node',
'InstanceFleetType': 'MASTER',
'InstanceTypeConfigs': [
{
'BidPrice': my_bid_price,
'EbsConfiguration': {
'EbsBlockDeviceConfigs': [
{
'VolumeSpecification': {
'SizeInGB': my_core_ebs_size,
'VolumeType': my_core_ebs_volume_type
},
'VolumesPerInstance': my_core_ebs_volumes
}
],
'EbsOptimized': True
},
'InstanceType': my_master_instance_type,
'WeightedCapacity': 1
}
],
'TargetOnDemandCapacity': 1
},
{
'Name': 'My Core Node',
'InstanceFleetType': 'CORE',
'InstanceTypeConfigs': [
{
'BidPrice': my_bid_price,
'EbsConfiguration': {
'EbsBlockDeviceConfigs': [
{
'VolumeSpecification': {
'SizeInGB': my_core_ebs_size,
'VolumeType': my_core_ebs_volume_type
},
'VolumesPerInstance': my_core_ebs_volumes
}
],
'EbsOptimized': True
},
'InstanceType': my_core_node_instance_type,
'WeightedCapacity': 1
}
],
'TargetSpotCapacity': my_num_core_nodes
}
],
'KeepJobFlowAliveWhenNoSteps': my_keep_alive,
'ServiceAccessSecurityGroup': my_emr_access_sg,
},
'JobFlowRole': 'MyJobFlowRole',
'LogUri': my_log_uri,
'Name': my_cluster_name,
'ReleaseLabel': my_release_label,
'ServiceRole': 'MyRole',
'StepConcurrencyLevel': my_step_concurrency,
'Tags': [],
'VisibleToAllUsers': True
}
为了让它工作,我需要在提交具有按需定价的队列时删除 bid_price
键。我正在传递字符串 OnDemandPrice
作为 bid_price
键的值,boto3 不喜欢它。