I want to capture and install custom Windows AMIs that can be reused using Sysprep. How can I do this?

Sysprep is a Microsoft tool that is used to capture custom Windows images. Sysprep removes unique information from the Amazon Elastic Compute Cloud (Amazon EC2) Windows instance, including the instance security identifiers (SID), computer name, and drivers. Duplicate SIDs can cause issues with Windows Server Update Services (WSUS), log-in issues, Windows volume key activation, Microsoft Office, and third-party products.  

Consider the following before running Sysprep:

  • Don't use Sysprep to create a backup for your instance.
  • Sysprep isn't supported on Windows Server 2016 Nano Server.
  • Use EC2Config for Windows Server 2008 through Windows Server 2012 R2.
  • Use RunSysprep with EC2Launch for Windows Server 2016 or later.

Run Sysprep with EC2Config or EC2Launch

  1. Open the Amazon EC2 console, and then connect to your Windows EC2 instance using Remote Desktop Protocol (RDP).
    Note: To create a standard custom image without Sysprep, follow the instructions to Create a Windows AMI. Be sure to note the AMI ID.
  2. From the Windows Start menu:
    For Windows Server 2008 through Windows Server 2012 R2, open EC2ConfigService Settings, and then choose the Image tab.
    For Windows Server 2016 or later, open EC2 Launch Settings.
  3. For Administrator Password, choose Random.
  4. Choose Shutdown with Sysprep.
  5. Choose Yes.
    Note: You must retrieve the new password from the EC2 console at the next service start.
  6. Open the Amazon EC2 console and choose Instances from the navigation pane.
  7. After the instance state is stopped, select your instance.
  8. For Actions, choose Image, Create Image.
    For Image name, enter a name.
    For Image description, enter a description.
  9. Choose Create Image.
  10. After the image completes, you can restart the instance.

For more information and customization options, see Create a Standard Amazon Machine Image Using Sysprep.

If you receive error messages or experience issues when using Sysprep, see Troubleshooting Sysprep with EC2Config.

You can also use EC2Rescue for Windows Server to collect log files and troubleshoot issues.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2018-09-04

Updated: 2019-03-25