domainname.comwww.domainname.comNextNextBlock all public access -> Create bucketOverview tab)Properties tab -> Static website hosting
use this bucket to host a websitePermissions tab:{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::parmsite.com/*"
}
]
}
Properties -> Static website hosting tabHosted zones -> Create Hosted Zone
Domain Name: enter the name of the s3 bucketType leave default Public Hosted Zone -> CreateCreate Record Set to be able to route traffic for your domain to the website bucket (more info)
A-IPv4 addressYesSimplewww.domainname.com (just enter www for the name attribute)
Static Web Hosting property to Redirect all requestswww.domainname.com bucketwww.domainname.com, it will be redirected your site without an error.Change where your domain pointsDNS -> Enter the 4 urls found in the Route 53 NS record!Certificate ManagerRequest a Certificate -> Request a public certificate
Domain name section (one for domainname.com and www.domainname.com)Origin Domain Name: s3 website endpoint for one of the bucketsOrigin Id: Pre-populated for you when you enter the Origin Domain NameViewer Protocol Policy: Set to Redirect HTTP to HTTPSAlternate Domain Names: Should match the s# bucket name ou are pointing to, ex. domainname.comSSL Certification: Select Custom SSL Certificate from the dropdownwww.domainname.comwww.domainname.com, in Properties -> Static Web Hosting
set the redirect protocol to HTTPS.A records created prior by changing the Alias Target to the CloudFront distributiondomainname.com and add the invalidation /*./other-pages, in s3: make sure the file has content-type set to text/html in the
metadata property tab and remove the .html from the filename!error pages tab to set the path to the custom page!