How to serve multiple S3 buckets via AWS CloudFront | Vimal Paliwal

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 24

  • @KhoaPham-sm1uf
    @KhoaPham-sm1uf 3 года назад

    Thank you very much, I tried more time for the whole day, but only you recommend it. Good luck to you, thank you.

  • @rahilfaiz3135
    @rahilfaiz3135 4 года назад

    Nice and simple!

    • @skildops
      @skildops  4 года назад

      Glad you like it!

  • @smilyanpavlov2142
    @smilyanpavlov2142 3 года назад

    Brilliant, thank you!

    • @skildops
      @skildops  3 года назад

      Glad you like it, Smilyan

  • @gotamp24
    @gotamp24 3 года назад

    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 :)

    • @skildops
      @skildops  3 года назад +1

      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.

    • @gotamp24
      @gotamp24 3 года назад

      @@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.

    • @skildops
      @skildops  3 года назад +1

      You're right Gotam. You will have to use file name. You can only have one default file at distribution level as of today.

  • @suresh1790
    @suresh1790 3 года назад

    Thanks a lot.

  • @ankitagarwal6014
    @ankitagarwal6014 3 года назад

    any videos on cloud9?

    • @skildops
      @skildops  3 года назад

      Unfortunately not at this moment

  • @andres-solarte
    @andres-solarte 4 года назад

    ¿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

    • @skildops
      @skildops  4 года назад +1

      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.

  • @virenlakum
    @virenlakum 3 года назад

    is there any way to serve contents from both buckets from root dir ?

    • @skildops
      @skildops  3 года назад

      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

  • @bibhudattasahoo2174
    @bibhudattasahoo2174 3 года назад

    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"

    • @skildops
      @skildops  3 года назад +1

      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

    • @bibhudattasahoo2174
      @bibhudattasahoo2174 3 года назад

      @@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 ?