This template will help you to easily host your website with your API. It will create a CloudFront distribution with S3 website bucket origin, API Gateway origin and Link with Route53 DNS record. SSL certificate will be appliled to the domain.
- Create a Hosted Zone
- Request a certificate for that domain and copy the certificate Arn
-
Goto CloudFormation Service and create a new stack with CloudFrontSetup.yml
-
Fill in the required parameters and create the stack
- Once the template creation is successful (~15mins) goto S3 and find the S3 bucket with the given domain name. Upload your website code eg: AngularJS, ReactJS, etc...
- S3 Butcket to upload website code
- Link with API Gateway
- Create CloudFront distribution with 1 & 2 Origins
- Add SSL certificate to CloudFront distribution
- Link Route53 domain to CloudFront
Now you can visit your website!