Validating an ACM certificate with CloudFormation
Creating ACM certificates via CloudFormation is cool, but validation isn’t.
The below template will create the ACM certificate and a Lambda custom resource.
The custom resource will poll the CloudFormation stack waiting for the ACM certificate resource to output an event with the DNS validation record details.
Once the event has been emitted, the custom resource will go on to create the required DNS records for validation. Once ACM has performed it’s validation, the stack will finish creating successfully.