During clusters import, if the cluster has an instance pool attached, the import will go to the function cleanup_cluster_pool_configs (to update the cluster config properly). In the function cleanup_cluster_pool_configs (dbclient/ClustersClient.py line 44), however, the last bit I think has a logical error:
# remove all aws_attr except for IAM role if it exists
if 'aws_attributes' in cluster_json:
aws_conf = cluster_json.pop('aws_attributes')
iam_role = aws_conf.get('instance_profile_arn', None)
if not iam_role:
cluster_json['aws_attributes'] = {'instance_profile_arn': iam_role}
return cluster_json
if not iam_role: should actually be if iam_role:. Currently, the instance profile is only added if there is no instance profile.
`