Understanding custom resources
When we declare a resource in a CloudFormation template, we provide a Type
attribute. This attribute declares a service and a resource that is going to be created—this means that CloudFormation understands where to go, what to do, and which API calls to make. The AWS
is a main namespace (for example, provider), and what comes after AWS
is another namespace, declaring the service. If it's EC2
, then CloudFormation will send calls to EC2's API. If it's RDS
, then it sends calls to RDS's API. The last block is the actual resource we want to create.
Custom resources (CRs) are the resources that don't fall under the official support of CloudFormation. These can be external providers, internal or self-hosted systems, or even services that don't support CloudFormation yet. The creation of CRs is usually a contract with three counteragents—the template developer, CR provider, and CloudFormation. While the template...