Scenario
Account A: Contains the Route 53 hosted zone for your domain.
Account B: Contains the ELB.
Account B: Contains the ELB.
Step-by-Step Guide
Step 1: Obtain the ELB DNS NameLog in to AWS Account B.
- Log in to AWS Account B.
- Navigate to the EC2 Console: Go to the EC2 dashboard.
- In the navigation pane, select Load Balancers.
- Copy the DNS Name of the ELB:Select your target ELB.
- Note down its DNS name (e.g., my-elb-1234567890.us-west-2.elb.amazonaws.com).
Step 2: Create Alias Record in Route 53
- Log in to AWS Account A.
- Open the Route 53 Console: Go to the Route 53 dashboard.
- Navigate to Hosted Zones and select the hosted zone for your domain.
- Create a New Record:Click on Create Record.
- Choose Simple Routing.
- Configure the Alias Record:Record Name: Leave this blank if you are configuring the zone apex (e.g., example.com), or enter the desired subdomain (e.g., www).
- Record Type: Choose A - IPv4 address.
- Alias: Select Yes.
- Alias Target: Paste the ELB DNS name copied from Account B.
- AWS will automatically resolve the Alias Hosted Zone ID associated with the ELB DNS name.
- Save the Record:Click Create records to save your changes.
Step 3: Verify the Configuration
Check the DNS Record:Use a DNS query tool like dig or nslookup to verify that the domain points to the ELB
dig example.com
The response should include the ELB DNS name.
Updated AWS Documentation
AWS has updated its documentation to clarify the process of creating cross-account alias records. You can refer to the AWS Route 53 Developer Guide for detailed information.
Conclusion
By following these steps, you can successfully create an alias record in AWS Route 53 that points to an ELB in another AWS account. This method ensures seamless integration of your domain with resources across multiple AWS accounts, enhancing your infrastructure’s flexibility and security.