簡體   English   中英

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.50OnDemandPrice - 都作為字符串。 還嘗試了0.50作為浮點數。 這些都不起作用。 但是,當我從字典中完全刪除 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 不喜歡的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM