- Create S3 Bucket
- Click on S3 Bucket
- Upload Files
- go to 'Permissions'
- scroll to Bucket Policies and click Edit
- Go to different tab and open CloudFront
- Create Distribution
- 'Origin Domain' - choose created bucket
- 'Origin Access Controls - create control settings - create
- WAF - do not enable security protections
- Custome SSL certificate
- Settings - use only N America and Europe
- Default root object - type: index.html
- Create Distribution
- Copy Policy
- Go to S3 bucket tab - Paste Policy - save changes
- Click Distribution - wait for Deployment
- Click on Distribution ID - copy Distribution Domain Name
- Create Record
- Alias - true
- Route traffic to - Alias to CloudFront distribution
- Select your disribution
- Register domain
- Request
- Domain names - Fully qualified domain name - example.com, *.example.com
- Create records in Route 53
- $ terraform state list
- $ terraform state rm 'aws_route53_zone.my_zone'
- $ terraform show -json
- $ terraform console