Which is the better design, and why? (see 2 tables)
1. Here is the configuration of my working website (example.com is the prevent domain)
as setup via a Youtube Tutorial...
Route53 |
Cloudfront Dist |
S3 |
A record example.com --> d1wxyz |
d1wxyz.cloudfront.net --> 1. |
1. example.com Hosting type Redirect request at www. |
A record www.example.com --> d21xyz |
d21xyz.cloudfront.net --> 2. |
2. www.example.com public stores assets |
So now when I turn on ACLs I have to have 2 sets of ACLs??? Doubling the cost.
-
2. Here is the configuration of what I would expect as a setup based on my previous experience with on premise servers
but I cannot find any advice on this, nor can I find any other solid tutorials like the setup above making it a bit hard to know.
Route53 |
Cloudfront Dist |
S3 |
A record example.com --> d1wxyz |
d1wxyz.cloudfront.net --> 1. |
1. example.com public stores assets |
CName record www.example.com --> d1wxyz |
d1wxyz.cloudfront.net (as above) |
example.com public stores assets (as above) |
This way seems more logical to me 1 bucket, no redirect from the second bucket and 1 distribution with a simple A record and CNAME both pointing at the Base distribution.
then only 1 set of ACLs are required?
the first way works, but seems overly complex, but maybe there is a good reason?
the 2nd seems more logical as per other web server setups I have done. But maybe there are pitfalls?
Which is the correct way? (assuming a simple website with Base domain and www subdomain)
I hope I have explained this well enough.