Score:0

S3 CloudFront distribution load different bucket based on IP

ag flag
Ben

I have a domain (myweb.com) pointed to one of my cloudfront distributions eg.:

myweb.com -> https://web1.s3.amazonaws.com/

now based on the internal organisation IP, I would like to load a new version of the site under the same domain not a subdomain:

myweb.com -> https://web2.s3.amazonaws.com/

soo if someone from outside of the company access myweb.com will get WEB1, within the organisation myweb.com will show WEB1

Is this possible?

Tim avatar
gp flag
Tim
Off the top of my head, I would probably look at something like having two different S3 buckets, using CloudFront to direct users to the correct bucket. I would have to give it more thought to work out if that was possible and how to do it. Another way to do it might be something to do with DNS, your internal corporate DNS returning a different CNAME / IP that points at a different bucket / origin. These are just ideas, rather than solutions, if you can't work it out and no-one else knows I could think some more.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.