amazon-web-services - AWS EMR : Enable auto-termination-policy in cloudformation

标签 amazon-web-services aws-cloudformation amazon-emr aws-step-functions

我正在尝试在 EMR 中启用自动终止策略。这是文档 https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-auto-termination-policy.html

我可以通过控制台、AWS CLI 以及使用 Python SDK (boto3) 轻松完成此操作。但我想在 cloudformation 模板中启用此功能,以便每当我创建 EMR 时,它都会自动采用此策略,并在集群闲置一段时间后终止集群。不幸的是我没有找到任何相关文档。事实上,我不确定这是否可能。

最佳答案

上述用例有一个 AutoTerminationPolicy 配置参数。 像下面这样的东西应该可以解决问题:

"AutoTerminationPolicy": {
    "IdleTimeout": 10800, # 3 hours
}

FWIW,user guide 中的任何地方都没有指定这一点文档。但经过一番研究发现here .

关于amazon-web-services - AWS EMR : Enable auto-termination-policy in cloudformation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71340289/

相关文章:

aws-cloudformation - 如何更新状态为 UPDATE_ROLLBACK_COMPLETE 的 CloudFormation 堆栈?

amazon-web-services - Cloudformation Yaml 内在函数 完整函数名称

python - 找不到 script-runner.jar

hadoop - Amazon EMR服务的Sqoop导入错误 “Could not load db driver class”

python - 无法在 AWS Cloud9 IDE 中使用 Python 访问本地环境变量

amazon-web-services - Kubectl不适用于AWS EC2实例

mysql - AWS Glue 未将 id(int) 列复制到 Redshift - 它是空白的

javascript - node.js 上的 SES 尽管返回 'success' 响应但未发送电子邮件

amazon-web-services - 如何修复错误 "DynamoDB returns GSI range key not specified errors"?

apache-spark - Spark 退出状态 134. 是什么意思