I was going to try to do it with cloudfront et al. Its been 2+ days… I am learning a lot its true. But I’ve got a deadline for a charitable site I’m helping to put up.
Are you deploying this in Virginia? The certificates for CloudFront must be created there to be able to be attached.
One thing that I would do is to remove the certificate resource from the cloudformation stack and create the certificate manually and then you can attach it to the distribution.
Most likely, your cert isn’t being created because domain validation isn’t working. If your domain was registered Seabees, you’ll have to add the text record provided by CloudFormation (or ACM) to prove you own the domain.
For a secure static site I thought cloudformation would be the easiest way. I previously had a static site in an s3 bucket with the a record in the hosted zone pointing to the buckets website endpoint. Secure static sites can’t have a website endpoint. The tutorial suggested using cloudformation, or cloudfront with a REST API. I don’t know what a rest API or what other things I’d have to do, but htats probably the next thing I’m trying.
I’ll have to learn a bit more, because i’m not really sure what the wizard is passing to cloudfront (it uses a url link to a template file and I don’t know whats in the file).
I don’t recall specifying ANY location in the cloudformation wizard. I’m not actually setting any details myself, as in the LAUNCH button in the tutorial comes with a prepopulated field, so I don’t think thats the problem.
I suggest you do it manually in the console first. Cloudformation is not easy for a beginner. In fact id suggest terraform instead.
Here are steps you can do manually and so you can test each step.
Use ACM to create the certificate. Update DNS to validate it.
Create the s3 bucket. Create the cloudfront and allow it to read your s3 bucket. Upload your indexhtml or whatever site content you have to s3. Test the site using cloudfront url. If it works now you can attach the cert to cloudfront. Cloudfront takes about 15 minutes to deploy so each change you will need to wait for it to propagate.
After you attach the cert, you can update your dns with a cname to the cloudfront url.
For something simple like this, unless you know CloudFormation or CDK well, I would just deploy manually. This should be a pretty basic Cloudfront + S3 deployment.
This. It is enough that the certificate is there.
I remember having the exact same trouble myself and the amount of face-palming once I found that piece of documentation where that was mentioned.
If it only would fail with an meaningful error message instead of just pending indifinetly.
I think I have a us-east-2 console. Could that be the problem!? Its a bit late for me here to zoom. Thanks so much for offering to help, I will send you a message after trying and probably failing, if youre still open to it.