Here's my scenario: We are moving an established domain to point to our new Shopify store. Currently or GoDaddy domain is pointing at AWS where the content is.
For our blog we have a subdomain blog.mydomain.com and on our EC2 instance on AWS in Nginx.conf we are redirecting that subdomain to mydomain.com/blog/. Works great.
That subdirectory structure is the meat and potatoes of our organic SEO, our blog is very popular, so we are trying to do all we can to keep that set up.
On GoDaddy I can create the blog.mydomain.com subdirectory and point it to a load-balancer DNS on AWS. I've done this with other domains.
I need to figure out how to point a subdomain that's pointing to an AWS load-balancer to finally end up at mydomain.com/blog.
Has anyone ever done anything like this?
Redirecting might be the wrong word, the AWS load balancer DNS will be doing something closer to reverse-proxy/rewriting if you're changing a particular URL route '/blog' to go another server.
Technically possible with an advanced setup of something like CloudFlare workers in front of Shopify with orange2orange (because Shopify already has CF in their stack it complicates things) you also need a paid CF plan, IIRC the Business is enough, but you may want to clarify things with CloudFlare themselves before going down this path, and there are resource limits to be aware of as well. Or you could use another proxy, possibly DNS on AWS in front of Shopify is capable as well?
I get the general idea around how to do it, and could probably give it a crack on my own sites if needed, but can't say I've done it myself, nor could point at a Shopify site that has it running. Would recommend testing on a separate staging domain to proof-of-concept the idea fully before doing it to live site though.
I understand what you're saying about blog structure being important for organic, but how familiar are you with Shopify blog capabilities, metafields and liquid templating? There could well be a way to re-platform/redirect to Shopify blog and retain all the functionality and structure you need, not really sure what the specific reqs are in your situation.