Apply AWS SSL certificate for s3 static hosting website
Apply for SSL certificate on aws console.
- Open cloudfront panel
-
choose to Create distribution button
- Origin path is where the index.html located
- Origin name is the s3 bucket name and bucket must be publicly readable
-
In SSL certification section, choose custom SSL Certification and hit Request or Import Certificate with ACM
Request a certification
-
Copy the domain name of cloudfront distribution generated by aws.
-
Add domain name: Enter the domain name that you want to register.
-
Next, it is request a validation.
- Aws will scan the application and decide the security level.
Redirect to the domain address to the distribution for https requests.
-
Click one of record for example, wonderful.example.com
-
Change the Value/Route traffic to the domain name of cloudfront distribution
-
Open the broswer and type https://wonderful.example.com
-
It will shows the website as security page.
Reference:
https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-https-requests-s3/