1

I have an angular application hosted on aws s3, say example.com. The url is hosted on route53. You can access my website in non https here: http://proscorepad.com/

I created two repository that are using my domain name: example.com www.example.com and they activated to host a webiste.

I created a certificate with CRM which is associated with my domain and attached it to a cloudFront redirection.

When I try to connect to my website in https mode, I get a page could not be reached error.

Can you give a checklist of things to verify in my configuration, or link to resources that would fit my configuration?

Edit:

The type of certificate I have is Amazon issued, it belong to example.com and *.example.com. I can see that it is associated with the right resource: arn:aws:cloudfront::distributionId

Here is my cloudFront behavior configuration

And its general configuration

Regarding my S3 server configuration, it is setup as a static website hosting and is public.

  • 1
    Sorry but this question is far too broad. What do you have installed on your server to listen for https requests? What type of certificate do you have? How is the web server configured? How is CloudFront configured? – Tim Jun 24 '18 at 20:08
  • @Tim, sorry for missing some information. I added some information in the question itself, the only part I did not get from your question was this one `What do you have installed on your server to listen for https requests?`. – Jean-Baptiste Jun 24 '18 at 21:12
  • Also, doesn't cloudFront intercept all the requests made to the S3 bucket? – Jean-Baptiste Jun 24 '18 at 21:12
  • 1
    True, with S3 as your back end you don't need web server / server config. – Tim Jun 24 '18 at 22:05

2 Answers2

1

You have to include the hostnames you want to make available at CloudFront in the property: 'Alternate Domain Names (CNAMEs)'. Add proscorepad.com to that list.

Only then will CloudFront accept this as a valid Domain Name for your distribution.

The reasoning behind that is, that CloudFront caches are shared infrastructure. Without a specific list of Domain names, CloudFront would not be able to determine if it should use your distribution instead of someone elses, possibly in another account.

M. Glatki
  • 1,964
  • 1
  • 17
  • 33
0

I finally fixed my issue, a couple of things were missing:

  • I needed to add CNAMES on my cloudFront, linking to the proscorepad.com and www.proscorepad.com.

  • The origin I used was the S3 listed by Amazon in the drop down menu, but since it is a web hosting S3, it needs to be the endpoint given by Amazon in the static hosting option in the S3 bucket.

  • I needed to change the A and AAAA record to match the cloudFront distribution instead of the S3.