Plain and simple. You got a nice tone too. Also thank you for explaining the route53 in between . I have a quick question though if you could answer. what if I have 3 different websites sitting on their respective s3 buckets but hosted on the CloudFront domains(in my case I have 3 CloudFront domains for each website). can route53 do the path routing to different CloudFront sites based on the route in the URL path? or should I just use 1 CloudFront with 3 bucket origins as you have shown in this video? The reason I asked this question is that I don’t want to use cloudfront’s domain name. so that I can later buy a new domain name from route53 and map it to my only Cloudfront domain. it’s not super clear If i can use custom domain and map it to 3 cloudfront domain(in my case). Again thank you so much :)
Thanks for your feedback Gotam. Glad you like it. Route53 does not support path based routing hence, you will have to achieve it via CloudFront Behaviours. Hope this helps. Let me know if you have more questions.
@@skildops Thank you for responding back to me Vim. In my case though, CF behavior won't work as I saw I have to type my second website html.index path followed by CF domain name, in order to access my second site, just like you showed in the video. I was looking to work the second site by tying this d1jskwjek2jj4j354.cloudfront.net/blog. but it turned out I have to write d1jskwjek2jj4j354.cloudfront.net/blog/index.html to access my second website. which I guess is not possible at the moment or feel free to correct me If I am wrong. Again thank you so much for your efforts.
¿What if you need to deal with routes in the nested path?. In example a react js app that uses React Router, in my case is only loading the index.html but the routes are not working
I would recommend switching to Hash Router. If you want to stick to normal Router you need to create a custom error response within your CloudFront distribution using the following settings. HTTP Error Code: 403, Customise Error Response: Yes, Response Page Path: / and HTTP Response Code: 200 Hope this helps.
I assume you want to serve content via two different domains like abc.com and blog.abc.com but from root of both the buckets so that you don't need to provide abc.com/blog. If yes, you can achieve that by utilising Lambda@Edge or new launched Cloud Functions and redirect request to respected origin based on domain name. Hope this answers your question. Thanks
in 1st bucket you click only dns xxxxxxxxxxxcloudfront.net (without enter index.html it takes by default that we select in the option "Default Root Object") but in 2nd you enter dns xxxxxxxxxxxxxxxcloudfront.net/folder-name/index.html can we enter only directory name like xxxxxxxxxxxcloudfront.net/folder-name then it wiil display the content or is there any option like "Default Root Object" MEANS IN BOTH THE URL'S SHOULD NOT INCLUDE "index.html"
As of today there isn't any straightforward way to achieve it. You can only have one default root object per distribution but if you want to achieve what you are asking for try Cloud Functions/Lambda@Edge though I'm not sure how easy will it be
@@skildops for 2nd bucket or url we don't have any option that works without index.html. But there is some way that i don't know but interviewer asked me. are you working in aws or devops ?
Thank you very much, I tried more time for the whole day, but only you recommend it. Good luck to you, thank you.
Glad it helped
Nice and simple!
Glad you like it!
Brilliant, thank you!
Glad you like it, Smilyan
Plain and simple. You got a nice tone too.
Also thank you for explaining the route53 in between
. I have a quick question though if you could answer. what if I have 3 different websites sitting on their respective s3 buckets but hosted on the CloudFront domains(in my case I have 3 CloudFront domains for each website). can route53 do the path routing to different CloudFront sites based on the route in the URL path? or should I just use 1 CloudFront with 3 bucket origins as you have shown in this video?
The reason I asked this question is that I don’t want to use cloudfront’s domain name. so that I can later buy a new domain name from route53 and map it to my only Cloudfront domain. it’s not super clear If i can use custom domain and map it to 3 cloudfront domain(in my case).
Again thank you so much :)
Thanks for your feedback Gotam. Glad you like it. Route53 does not support path based routing hence, you will have to achieve it via CloudFront Behaviours. Hope this helps. Let me know if you have more questions.
@@skildops Thank you for responding back to me Vim.
In my case though, CF behavior won't work as I saw I have to type my second website html.index path followed by CF domain name, in order to access my second site, just like you showed in the video. I was looking to work the second site by tying this d1jskwjek2jj4j354.cloudfront.net/blog. but it turned out I have to write d1jskwjek2jj4j354.cloudfront.net/blog/index.html to access my second website. which I guess is not possible at the moment or feel free to correct me If I am wrong.
Again thank you so much for your efforts.
You're right Gotam. You will have to use file name. You can only have one default file at distribution level as of today.
Thanks a lot.
Glad to help
any videos on cloud9?
Unfortunately not at this moment
¿What if you need to deal with routes in the nested path?. In example a react js app that uses React Router, in my case is only loading the index.html but the routes are not working
I would recommend switching to Hash Router. If you want to stick to normal Router you need to create a custom error response within your CloudFront distribution using the following settings. HTTP Error Code: 403, Customise Error Response: Yes, Response Page Path: / and HTTP Response Code: 200
Hope this helps.
is there any way to serve contents from both buckets from root dir ?
I assume you want to serve content via two different domains like abc.com and blog.abc.com but from root of both the buckets so that you don't need to provide abc.com/blog. If yes, you can achieve that by utilising Lambda@Edge or new launched Cloud Functions and redirect request to respected origin based on domain name. Hope this answers your question. Thanks
in 1st bucket you click only dns xxxxxxxxxxxcloudfront.net (without enter index.html it takes by default that we select in the option "Default Root Object")
but in 2nd you enter dns xxxxxxxxxxxxxxxcloudfront.net/folder-name/index.html
can we enter only directory name like xxxxxxxxxxxcloudfront.net/folder-name
then it wiil display the content or is there any option like "Default Root Object"
MEANS IN BOTH THE URL'S SHOULD NOT INCLUDE "index.html"
As of today there isn't any straightforward way to achieve it. You can only have one default root object per distribution but if you want to achieve what you are asking for try Cloud Functions/Lambda@Edge though I'm not sure how easy will it be
@@skildops for 2nd bucket or url we don't have any option that works without index.html. But there is some way that i don't know but interviewer asked me.
are you working in aws or devops ?