- Create S3 bucket
- Enable public access
- Enable static site hosting
- Add bucket policy like:
{
"Version": "2008-10-17",
"Id": "Policy1547311985882",
"Statement": [
{
"Sid": "Stmt1548311884279",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::hypetrigger-site/*"
}
]
}
- Create (free) public cert
- Deploy Route53 record for domain name and wait for automatic validation
- Create a deployment with the origin as the public URL of the s3 bucket
- Add cert from ACM
- Add alternate domain name after adding cert
- Quick create record/Edit existing type A record
- Alias=true
- Alias to CloudFront distribution
- Choose distribution
- Add
trailingSlash: true
tonext.config.js
- Add custom nameservers in the third-party hosting provider
- Copy the 4 nameservers from Route53
- Also add a AAAA record aliased to CloudFront distribution for IPv6 support
- Build locally (e.g.
vite build
ornext build
) - Use
aws s3 sync
to upload contents ofout
/dist
folder to bucket