AWS Compute Blog
Creating a cross-region Active Directory domain with AWS Launch Wizard for Microsoft Active Directory
AWS Launch Wizard is a console-based service to quickly and easily size, configure, and deploy third party applications, such as Microsoft SQL Server Always On and HANA based SAP systems, on AWS without the need to identify and provision individual AWS resources. AWS Launch Wizard offers an easy way to deploy enterprise applications and optimize costs. Instead of selecting and configuring separate infrastructure services, you go through a few steps in the AWS Launch Wizard and it deploys a ready-to-use application on your behalf. It reduces the time you need to spend on investigating how to provision, cost and configure your application on AWS.
You can now use AWS Launch Wizard to deploy and configure self-managed Microsoft Windows Server Active Directory Domain Services running on Amazon Elastic Compute Cloud (EC2) instances. With Launch Wizard, you can have fully-functioning, production-ready domain controllers within a few hours—all without having to manually deploy and configure your resources.
You can use AWS Directory Service to run Microsoft Active Directory (AD) as a managed service, without the hassle of managing your own infrastructure. If you need to run your own AD infrastructure, you can use AWS Launch Wizard to simplify the deployment and configuration process.
In this post, I walk through creation of a cross-region Active Directory domain using Launch Wizard. First, I deploy a single Active Directory domain spanning two regions. Then, I configure Active Directory Sites and Services to match the network topology. Finally, I create a user account to verify replication of the Active Directory domain.
Figure 1: Diagram of resources deployed in this post
Prerequisites
- You must have a VPC in your home. Additionally, you must have remote regions that have CIDRs that do not overlap with each other. If you need to create VPCs and subnets that do not overlap, please refer here.
- Each subnet used must have outbound internet connectivity. Feel free to either use a NAT Gateway or Internet Gateway.
- The VPCs must be peered in order to complete the steps in this post. For information on creating a VPC Peering connection between regions, please refer here.
- If you choose to deploy your Domain Controllers to a private subnet, you must have an RDP jump / bastion instance setup to allow you to RDP to your instance.
Deploy Your Domain Controllers in the Home Region using Launch Wizard
In this section, I deploy the first set of domain controllers into the us-east-1 the home region using Launch Wizard. I refer to US-East-1 as the home region, and US-West-2 as the remote region.
- In the AWS Launch Wizard Console, select Active Directory in the navigation pane on the left.
- Select Create deployment.
- In the Review Permissions page, select Next.
- In the Configure application settings page set the following:
- General:
- Deployment name: UsEast1AD
- Active Directory (AD) installation
- Installation type: Active Directory on EC2
- Domain Settings:
- Number of domain controllers: 2
- AMI installation type: License-included AMI
- General:
-
- License-included AMI: ami-################# | Windows_Server-2019-English-Full-Base-202#-##-##
-
- Connection type: Create new Active Directory
- Domain DNS name: corp.example.com
- Domain NetBIOS Name: CORP
-
- Connectivity:
- Key Pair Name: Choose and exiting Key pair or select and existing one.
- Virtual Private Cloud (VPC): Select Virtual Private Cloud (VPC)
- Connectivity:
-
- VPC: Select your home region VPC
-
- Availability Zone (AZ) and private subnets:
- Select 2 Availability Zones
- Choose the proper subnet in each subnet
- Assign a Controller IP address for each domain controller
- Remote Desktop Gateway preferences: Disregard for now, this is set up later.
- Check the I confirm that a public subnet has been set up. Each of the selected private subnets have outbound connectivity enabled check box.
- Availability Zone (AZ) and private subnets:
- Select Next.
- In the Define infrastructure requirements page, set the following inputs.
- Storage and compute: Based on infrastructure requirements
- Number of AD users: Up to 5000 users
- Select Next.
- In the Review and deploy page, review your selections. Then, select Deploy.
Note that it may take up to 2 hours for your domain to be deployed. Once the status has changed to Completed, you can proceed to the next section. In the next section, I prepare Active Directory Sites and Services for the second set of domain controller in my other region.
Configure Active Directory Sites and Services
In this section, I configure the Active Directory Sites and Services topology to match my network topology. This step ensures proper Active Directory replication routing so that domain clients can find the closest domain controller. For more information on Active Directory Sites and Services, please refer here.
Retrieve your Administrator Credentials from Secrets Manager
- From the AWS Secrets Manager Console in us-east-1, select the Secret that begins with LaunchWizard-UsEast1AD.
- In the middle of the Secret page, select Retrieve secret value.
- This will display the username and password key with their values.
- You need these credentials when you RDP into one of the domain controllers in the next steps.
Rename the Default First Site
- Log in to the one of the domain controllers in us-east-1.
- Select Start, type dssite and hit Enter on your keyboard.
- The Active Directory Sites and Services MMC should appear.
- Expand Sites. There is a site named Default-First-Site-Name.
- Right click on Default-First-Site-Name select Rename.
- Enter us-east-1 as the name.
- Leave the Active Directory Sites and Services MMC open for the next set of steps.
Create a New Site and Subnet Definition for US-West-2
- Using the Active Directory Sites and Services MMC from the previous steps, right click on Sites.
- Select New Site… and enter the following inputs:
- Name: us-west-2
- Select DEFAULTIPSITELINK.
- Select OK.
- A pop up will appear telling you there will need to be some additional configuration. Select OK.
- Expand Sites and right click on Subnets and select New Subnet.
- Enter the following information:
- Prefix: the CIDR of your us-west-2 VPC. An example would be 1.0.0/24
- Site: select us-west-2
- Select OK.
- Leave the Active Directory Sites and Services MMC open for the following set of steps.
Configure Site Replication Settings
Using the Active Directory Sites and Services MMC from the previous steps, expand Sites, Inter-Site Transports, and select IP. You should see an object named DEFAULTIPSITELINK,
- Right click on DEFAULTIPSITELINK.
- Select Properties. Set or verify the following inputs on the General tab:
- Sites in this site link: us-east-1 and us-west-2
- Cost: 100
- Replicate every: 15 minutes
- Select Apply.
- In the DEFAULTIPSITELINK Properties, select the Attribute Editor tab and modify the following:
- Scroll down and double click on Enter 1 for the Value, then select OK twice.
- For more information on these settings, please refer here.
- Scroll down and double click on Enter 1 for the Value, then select OK twice.
- Close the Active Directory Sites and Services MMC, as it is no longer needed.
Prepare Your Home Region Domain Controllers Security Group
In this section, I modify the Domain Controllers Security Group in us-east-1. This allows the domain controllers deployed in us-west-2 to communicate with each other.
- From the Amazon Elastic Compute Cloud (Amazon EC2) console, select Security Groups under the Network & Security navigation section.
- Select the Domain Controllers Security Group that was created with Launch Wizard Active Directory.
- Select Edit inbound rules. The Security Group should start with LaunchWizard-UsEast1AD-.
- Choose Add rule and enter the following:
- Type: Select All traffic
- Protocol: All
- Port range: All
- Source: Select Custom
- Enter the CIDR of your remote VPC. An example would be 1.0.0/24
- Select Save rules.
Create a Copy of Your Administrator Secret in Your Remote Region
In this section, I create a Secret in Secrets Manager that contains the Administrator credentials when I created a home region.
- Find the Secret that being with LaunchWizard-UsEast1AD from the AWS Secrets Manager Console in us-east-1.
- In the middle of the Secret page, select Retrieve secret value.
- This displays the username and password key with their values. Make note of these keys and values, as we need them for the next steps.
- From the AWS Secrets Manager Console, change the region to us-west-2.
- Select Store a new secret. Then, enter the following inputs:
- Select secret type: Other type of secrets
- Add your first keypair
- Select Add row to add the second keypair
- Select Next, then enter the following inputs.
- Secret name: UsWest2AD
- Select Next twice
- Select Store
Deploy Your Domain Controllers in the Remote Region using Launch Wizard
In this section, I deploy the second set of domain controllers into the us-west-1 region using Launch Wizard.
- In the AWS Launch Wizard Console, select Active Directory in the navigation pane on the left.
- Select Create deployment.
- In the Review Permissions page, select Next.
- In the Configure application settings page, set the following inputs.
- General
- Deployment name: UsWest2AD
- Active Directory (AD) installation
- Installation type: Active Directory on EC2
- Domain Settings:
- Number of domain controllers: 2
- AMI installation type: License-included AMI
- License-included AMI: ami-################# | Windows_Server-2019-English-Full-Base-202#-##-##
- General
-
- Connection type: Add domain controllers to existing Active Directory
- Domain DNS name: corp.example.com
- Domain NetBIOS Name: CORP
- Domain Administrator secret name: Select you secret you created above.
- Add permission to secret
- After you verified the Secret you created above has the policy listed. Check the checkbox confirming the secret has the required policy.
-
- Domain DNS IP address for resolution: The private IP of either domain controller in your home region
-
- Connectivity:
- Key Pair Name: Choose an existing Key pair
- Virtual Private Cloud (VPC): Select Virtual Private Cloud (VPC)
- Connectivity:
-
- VPC: Select your home region VPC
-
- Availability Zone (AZ) and private subnets:
- Select 2 Availability Zones
- Choose the proper subnet in each subnet
- Assign a Controller IP address for each domain controller
- Remote Desktop Gateway preferences: disregard for now, as I set this later.
- Check the I confirm that a public subnet has been set up. Each of the selected private subnets have outbound connectivity enabled check box
- Availability Zone (AZ) and private subnets:
- In the Define infrastructure requirements page set the following:
- Storage and compute: Based on infrastructure requirements
- Number of AD users: Up to 5000 users
- In the Review and deploy page, review your selections. Then, select Deploy.
Note that it may take up to 2 hours to deploy domain controllers. Once the status has changed to Completed, proceed to the next section. In this next section, I prepare Active Directory Sites and Services for the second set of domain controller in another region.
Prepare Your Remote Region Domain Controllers Security Group
In this section, I modify the Domain Controllers Security Group in us-west-2. This allows the domain controllers deployed in us-west-2 to communicate with each other.
- From the Amazon Elastic Compute Cloud (Amazon EC2) console, select Security Groups under the Network & Security navigation section.
- Select the Domain Controllers Security Group that was created by your Launch Wizard Active Directory.
- Select Edit inbound rules. The Security Group should start with LaunchWizard-UsWest2AD-EC2ADStackExistingVPC-
- Choose Add rule and enter the following:
- Type: Select All traffic
- Protocol: All
- Port range: All
- Source: Select Custom
- Enter the CIDR of your remote VPC. An example would be 0.0.0/24
- Choose Save rules.
Create an AD User and Verify Replication
In this section, I create a user in one region and verify that it replicated to the other region. I also use AD replication diagnostics tools to verify that replication is working properly.
Create a Test User Account
- Log in to one of the domain controllers in us-east-1.
- Select Start, type dsa and press Enter on your keyboard. The Active Directory Users and Computers MMC should appear.
- Right click on the Users container and select New > User.
- Enter the following inputs:
- First name: John
- Last name: Doe
- User logon name: jdoe and select Next
- Password and Confirm password: Your choice of complex password
- Uncheck User must change password at next logon
- Select Next.
- Select Finish.
Verify Test User Account Has Replicated
- Log in to the one of the domain controllers in us-west-2.
- Select Start and type dsa.
- Then, press Enter on your keyboard. The Active Directory Users and Computers MMC should appear.
- Select Users. You should see a user object named John Doe.
Note that if the user is not present, it may not have been replicated yet. Replication should not take longer than 60 seconds from when the item was created.
Summary
Congratulations, you have created a cross-region Active Directory! In this post you:
- Launched a new Active Directory forest in us-east-1 using AWS Launch Wizard.
- Configured Active Directory Sites and Service for a multi-region configuration.
- Launched a set of new domain controllers in the us-west-2 region using AWS Launch Wizard.
- Created a test user and verified replication.
This post only touches on a couple of features that are available in the AWS Launch Wizard Active Directory deployment. AWS Launch Wizard also automates the creation of a Single Tier PKI infrastructure or trust creation. One of the prime benefits of this solution is the simplicity in deploying a fully functional Active Directory environment in just a few clicks. You no longer need to do the undifferentiated heavy lifting required to deploy Active Directory. For more information, please refer to AWS Launch Wizard documentation.