Good news, CloudFormation added support for AWS Certificate Manager recently. Creating a CloudFront distribution which is using an ACM certificate is finally possible with CloudFromation as well.
The following listing shows the definition of an ACM certificate as well as its usage within a CloudFront distribution.
"Certificate" : { |
Sounds great so far. Nevertheless, I struggled to create a stack containing the ACM certificate and a CloudFront distribution.
CloudFormation reported the following error:
CREATE_FAILED AWS::CloudFront::Distribution Distribution The specified SSL certificate doesn't exist, isn't valid, or doesn't include a valid certificate chain. |
It took me some time to figure out the reason: I tried to create the stack in eu-west-1
. But the ACM certificate needs to be created in us-east-1
when used together with CloudFront. So one possible solution was to create the CloudFormation stack in us-east-1
. Lesson learned! 🙂
- How we run our blog cloudonaut.io
- Free ebook: Building and Deploying Applications on the Cloud
- Getting ISO 27001 certified as a 2-person company
- Master Your IT Skills: The Definitive 2025 Guide to Achieving LPIC-1 102-500 Certification and Elevating Your Career
- Mastering EPM-DEF Certification in 2025: Unlock Your Path to Cybersecurity Excellence