Creating Resources Outside AWS Using Custom Resources
CloudFormation is usually the first Infrastructure as Code (IaC) instrument to start supporting new AWS services; however, sometimes we need to communicate to services that don’t support CloudFormation. Sometimes we even need to create resources outside of AWS.
At the moment of this writing, CloudFormation added support for extensions. A private registry, which is one such extension, allows developers to build their own resource types, and we will cover this in depth in Chapter 8, Creating Your Own Resource Registry for CloudFormation.
Before, developers would use a Custom Resource (CR)—a CloudFormation resource type that uses AWS Lambda as a resource provisioner. If you are working in a greenfield environment, I encourage you to adopt private registries. However, some mature companies and shops may still use CRs that need to be maintained.
In this chapter, we will create external resources using CRs—...