AWS - Setup AWS CloudFront
Create a CloudFront Distributions
Go to Services > CloudFront
Click on Create Distribution and choose Web Distribution
Set the Origin Domain Name to be the newly created s3 bucket
Select Redirect HTTP to HTTPS to enable https
To enable gzip compression for faster load times, set Compress Objects Automatically to yes
Under Alternative Domain names (CNAMEs) enter the URLs where you want your website to be accessible. (in this case, the s3 bucket name or subdomains that your SSL certificate supports, i.e: xxx.cloudfront.net)
Set the Default Root Object to index.html so it redirects / to /index.html
Click Create Distribution and wait until the distribution is created




Add CloudFront's Domain name to your DNS CNAME

PreviousAWS - Deploy Nest.js Server to Elastic BeanstalkNextAWS - Configure HTTPS for CloudFront with GoDaddy Domain
Last updated
Was this helpful?