How to Clone AWS EC2 Windows Instance

This article shows how to clone EC2 instances with EC2 Launch Settings supporting Windows Sysprep. AMI Image will be created when the EC2 source instance is prepared. Launch a new Instance from the AMI and continue to do more customization after logging in to the newly created Instance.

Prepare EC2 Instance for Cloning

EC2 Instance contains Windows Unique Identifier such as SID and Computer Name. Before cloning, I recommend preparing Instance with SysPrep so that AMI Image can have its own identifier.

Open EC2 Launch Settings that Instance already has. Choose “Random” for Administrator Password and select “Shutdown with SysPrep”. Confirm SysPrep and Apply.

Close the current RDP session, and make sure that the instance stopped in EC2 Console.

Create AMI Image from EC2 Instance

In the EC2 instance list, select the Instance you want to clone from. Right-click the instance, and click “Create Image”.

Enter Image name, and click “Create”.

Monitor AMI creation process, and wait until Status becomes “Available”

Launch New EC2 Instance from AMI

In EC2 Service, there is a section of AMIs under Image.

In the right pane, click AMI Image you want to use, and select “Launch instance from image”.

Select Instance Type, Network, Subnet, domain join directory, IAM role, and Security Group.

Click “Review and Launch”, and choose key-pair when confirming launch.

Monitor progress via the EC instance list and wait until the instance is fully ready.

Log in to New Instance

The new instance has its own IP, own Computer Name, new administrator password as the AMI image was prepared with Windows SysPrep.

The instance has a new random Administrator password, get Administrator’s Password from Instance (Instance -> Security -> Get Administrator Password).

RDP with IP and the administrator credential.

You can customize windows further by assigning a Computer Name, joining a domain, etc.

Related articles:

How to run IIS on Windows Server Container on AWS

How to Create AWS EC2 Instance: simple guide

Security Group Rules for Web Server EC2 Instance

Leave a Comment