gpt4 book ai didi

amazon-web-services - 使用 Cloudformation 从快照重新创建 RDS 实例

转载 作者:行者123 更新时间:2023-12-03 07:26:12 25 4
gpt4 key购买 nike

我想使用 Cloudformation 创建一个 RDS 实例,并在删除堆栈时保留快照。根据 AWS,我可以通过在我的 Cloudformation 模板中设置 DeletionPolicy: Snapshot 来做到这一点。

当我从同一模板创建堆栈时,我想使用快照。我可以使用 DBSnapshotIdentifier 来做到这一点。

单个 Cloudformation 模板是什么样的:

第一次创建RDS实例并且没有可用快照时可以工作吗?

每次删除堆栈时都会更新DBSnapshotIdentifier

谢谢!

最佳答案

works when the RDS instance is created for the very first time andthere no snapshot available?

不,这不起作用。 DBSnapshotIdentifier 需要快照 ARN,在创建快照之前您不会拥有该 ARN。

updates the DBSnapshotIdentifier every time the stack gets deleted?

这里的最佳解决方案是在 Cfn 模板中使用一个参数来接收快照 ARN。

引用:

关于amazon-web-services - 使用 Cloudformation 从快照重新创建 RDS 实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75496344/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com