- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
I'm a little unclear about what you're trying to do here.
If I follow correctly: Browser navigates to firstexample.com
(hosted on ALB/EC2) which then redirects to secondexample.com
(hosted on CloudFront/S3). You're looking for a way such that the browser doesn't see secondexample.com
once redirected but firstexample.com
instead?
By setting up (say) static.firstexample.com
on CloudFront you can then pull static content from any S3 bucket you like. Then the redirect would be to static.firstexample.com
. But you can't have the same hostname firstexample.com
used for both CloudFront and ALB - well, not without randomly sending browser to either location.
However, the subject of your question mentions Route 53. In this case, if you're hosting content on firstexample.com
you do need Route 53 in order to assign the "apex record" to a specific endpoint (ALB, CloudFront, whatever). If you were redirecting from www.firstexample.com
to www.secondexample.com
or static.firstexample.com
then an on-premises DNS will work fine. Naturally, my next question would be "why not use Route 53 given it is a fully managed and highly available service".
Contenuto pertinente
- AWS UFFICIALEAggiornata 9 mesi fa
- AWS UFFICIALEAggiornata 10 mesi fa
- AWS UFFICIALEAggiornata 3 anni fa
I wanted to keep the original domain entered into the browser while serving up content from the S3 bucket. We did not want to use Route53 as that would require us to dedicate a portion of our IP address space to Route53 and that may change in the future. The question was incomplete and should have provided more detail. You were right in guessing what I was actually trying to do. In this case, I think we should use ALB/EC2 forwarding to an EC2 managed by Elastic Beanstalk.
I'm not sure why using Route 53 means dedicating a portion of your IP address space to Route 53. The only restriction here is that apex records are assigned to Route 53 Alias records which necessitates those resource being in AWS. But that has nothing to do with IP addressing.