When I create an HTTPS certificate in AWS for example.com it works, and I can attach it to my Cloudfront just fine ... IF I set "Alternate Domain Names (CNAMEs)" to example.com.
Similarly, if I create a certificate for *.example.com, I can attach it to my Cloudfront ... IF I set "Alternate Domain Names (CNAMEs)" to www.example.com.
Strangely though, if I try to use either certificate with a Cloudfront record for both Alternate Domains, I get:
InvalidViewerCertificateException: The certificate that is attached to your distribution doesn't cover the alternate domain name (CNAME) that you're trying to add
Do I really need two certificates and two Cloudfront records just to cover the www. case also? It seems like it should be possible to just have one certificate which supports a single Cloudfront record, and that record covers both www.example.com and example.com.
Is that possible?