首页 > 解决方案 > 使用相同参数更新 CloudFormation 自定义资源

问题描述

有没有办法在不更新参数的情况下触发自定义资源 lambda?当我更新堆栈而不进行更改时,它不会检测到要修改的资源。我正在考虑的唯一解决方案是使用带有随机值的无用参数来调用 lambda。

标签: amazon-web-servicesaws-lambdaamazon-cloudformationaws-cloudformation-custom-resource

解决方案


A custom resource really should be something that only needs to be called when something changes. That's how CloudFormation works. If you really need to force it to "update" then what you are describing would work. Your code doesn't need to care or even know about the extra parameter. As long as the value changes the call to update it will be made.


推荐阅读