简体   繁体   中英

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.

  • A resource provider is plain old code where one writes hooks for all the Stack operations (update, create, delete, etc).

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

18 Nov 2019 Resource Provider announcement

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM