amazon-web-services - AWS - 启用延迟维护的 RedShift CloudFormation

标签 amazon-web-services amazon-redshift aws-cloudformation

我正在尝试查找如何使用 CloudFormation 配置将推迟维护时段设置为启用。目前,当我使用 CF 创建集群时,此选项设置为禁用,并且我找不到启用此选项的属性。

是否有属性可以启用推迟维护时段选项?

我知道我可以从 CLI 中使用以下内容来完成此操作:

response = client.modify_cluster_maintenance(
    ClusterIdentifier='string',
    DeferMaintenance=True|False,
    DeferMaintenanceIdentifier='string',
    DeferMaintenanceStartTime=datetime(2015, 1, 1),
    DeferMaintenanceEndTime=datetime(2015, 1, 1),
    DeferMaintenanceDuration=123
)

但我正在寻找一种使用 CloudFormation 进行设置的方法

最佳答案

看来这是不可能的。

CloudFormation 支持的唯一与维护相关的值是 PreferredMaintenanceWindow

最坏的情况,您可以创建一个 AWS Lambda-backed custom resources创建集群后可以运行 modify_cluster_maintenance() 命令。 (编写自定义资源有点棘手,特别是如果您以前从未使用过 Lambda。)

关于amazon-web-services - AWS - 启用延迟维护的 RedShift CloudFormation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62916540/

相关文章:

aws-cloudformation - 使用 EC2 而不是 FARGATE 启动类型启动容器

python - pymysql.err.InternalError : (1049, "Unknown database")

amazon-web-services - 在api网关的方法请求中设置默认参数

amazon-redshift - Redshift : Unnest subquery's result on leader is not supported

amazon-redshift - Amazon Redshift中的generate_series函数

amazon-web-services - 用于在所有可用区部署 cloudwatch 的 AWS cloudformation 模板

amazon-web-services - 允许用户通过标签管理 EC2

amazon-s3 - 重写 Amazon S3 静态 URL

sql - Redshift SQL 查询 - 优化

amazon-web-services - 设置 IAM 用户/角色的跨账户访问