[英]In AWS cloudformation, what is the difference between a custom resource and a resource provider?
As per my understanding:根据我的理解:
A custom resource is just an AWS Lambda function that runs whenever the stack is provisioned or updated or deleted.自定义资源只是一个 AWS Lambda 函数,只要堆栈被预置、更新或删除,它就会运行。
A resource provider is plain old code where one writes hooks for all the Stack operations (update, create, delete, etc).资源提供者是普通的旧代码,其中为所有 Stack 操作(更新、创建、删除等)编写挂钩。
I can't see why anyone would use the former over the latter.我不明白为什么有人会使用前者而不是后者。 Resource providers seem easier to write and test.资源提供者似乎更容易编写和测试。
One historical reason is that custom resources were the only option until recently:一个历史原因是自定义资源直到最近都是唯一的选择:
CloudFormation Release History CloudFormation 发布历史
18 Nov 2019 Resource Provider announcement 2019 年 11 月 18 日资源提供商公告
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.