首页 > 解决方案 > 使用 boto3 检索具有自动缩放设置的 EMR 集群列表

问题描述

在 aws lambda 中使用 emr boto3 是否可以检索具有自动缩放参数设置的集群列表?如果可能,那么应该从此链接使用哪个 boto3 客户端。 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/emr.html#client

标签: pythonamazon-web-servicesaws-lambdaboto3amazon-emr

解决方案


Autoscaling is set on instance groups, not on clusters.

If you want to see all the instance groups' autoscaling policies, you will first need to get the list of all clusters and then get the instance groups of each cluster.

Notice that in the response to get_instance_groups, you get the AutoScalingPolicy value.


推荐阅读