We purchased a domain "company.com" through GoDaddy(managed by my company) and configured the DNS for same domain in my aws account aws-dev. I created a sub-domain in aws-dev, "sales.dev.company.com" using a public hosted zone and configured required Route 53 entries. I am to able to access this sub-domain successfully. Now we have got another aws account aws-test, and we want to transfer the DNS (for company.com) to this account but want to keep sub-domain/hosted zone for sales.dev.company.com in aws-dev only as services are running in this account.
Is there a way i can transfer the dns for company.com to aws-test and whenever a request comes in for sales.dev.company.com, it gets routed to another aws account aws-dev in this case which hosts mapped service and otherwise all requests for company.com will be serviced from aws-test account ? If yes how this can be achieved ?
After searching around this solution worked for me:
In simple terms this is what happens - whenever a request is being made to sales.dev.company.com, it first go to GoDaddy which forward it to aws-test which own company.com and now because aws-test knows where sales.dev.company.com lives, it gets forwarded to aws-dev.