Add optional Windows Server components to Amazon EC2 Windows instances - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Add optional Windows Server components to Amazon EC2 Windows instances

To access and install the optional components, you must find the correct EBS snapshot for your version of Windows Server, create a volume from the snapshot, and attach the volume to your instance.

Before you begin

Use the Amazon Web Services Management Console or a command line tool to get the instance ID and Availability Zone of your instance. You must create your EBS volume in the same Availability Zone as your instance.

Use one of the following procedures to add Windows Server components to your instance.

Console
To add Windows components to your instance using the console
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the navigation pane, choose Snapshots.

  3. From the Filter bar, choose Public snapshots.

  4. Add the Owner Alias filter and choose amazon.

  5. Add the Description filter and enter Windows.

  6. Press Enter

  7. Select the snapshot that matches your system architecture and language preference. For example, select Windows 2019 English Installation Media if your instance is running Windows Server 2019.

  8. Choose Actions, Create volume from snapshot.

  9. For Availability Zone, select the Availability Zone that matches your Windows instance. Choose Add tag and enter Name for the tag key and a descriptive name for the tag value. Choose Create volume.

  10. In the Successfully created volume message (green banner), choose the volume that you just created.

  11. Choose Actions, Attach volume.

  12. From Instance, select the instance ID.

  13. For Device name, enter the name of the device for the attachment. If you need help with the device name, see Device names for volumes on Amazon EC2 instances.

  14. Choose Attach volume.

  15. Connect to your instance and make the volume available. For more information, see Make an Amazon EBS volume available for use in the Amazon EBS User Guide.

    Important

    Do not initialize the volume.

  16. Open Control Panel, Programs and Features. Choose Turn Windows features on or off. If you are prompted for installation media, specify the EBS volume with the installation media.

  17. (Optional) When you are finished with the installation media, you can detach the volume. After you detach the volume, you can delete it.

Amazon CLI
To add Windows components to your instance using the Amazon CLI
  1. Use the describe-snapshots command with the owner-ids parameter and description filter to get a list of the available installation media snapshots.

    aws ec2 describe-snapshots --owner-ids amazon --filters Name=description,Values=Windows*
  2. In the output, note the ID of the snapshot that matches your system architecture and language preference. For example:

    { "Snapshots": [ ... { "OwnerAlias": "amazon", "Description": "Windows 2019 English Installation Media", "Encrypted": false, "VolumeId": "vol-be5eafcb", "State": "completed", "VolumeSize": 6, "Progress": "100%", "StartTime": "2019-10-25T20:00:47.000Z", "SnapshotId": "snap-22da283e", "OwnerId": "123456789012" }, ... ] }
  3. Use the create-volume command to create a volume from the snapshot. Specify the same Availability Zone as your instance.

    aws ec2 create-volume --snapshot-id snap-22da283e --volume-type gp2 --availability-zone us-east-1a
  4. In the output, note the volume ID.

    { "AvailabilityZone": "us-east-1a", "Encrypted": false, "VolumeType": "gp2", "VolumeId": "vol-0c98b37f30bcbc290", "State": "creating", "Iops": 100, "SnapshotId": "snap-22da283e", "CreateTime": "2017-04-18T10:33:10.940Z", "Size": 6 }
  5. Use the attach-volume command to attach the volume to your instance.

    aws ec2 attach-volume --volume-id vol-0c98b37f30bcbc290 --instance-id i-01474ef662b89480 --device xvdg
  6. Connect to your instance and make the volume available. For more information, see Make an Amazon EBS volume available for use in the Amazon EBS User Guide.

    Important

    Do not initialize the volume.

  7. Open Control Panel, Programs and Features. Choose Turn Windows features on or off. If you are prompted for installation media, specify the EBS volume with the installation media.

  8. (Optional) When you are finished with the installation media, use the detach-volume command to detach the volume from your instance. After you detach the volume, you can use the delete-volume command to delete the volume.

Tools for Windows PowerShell
Add Windows components to your instance using the Tools for Windows PowerShell
  1. Use the Get-EC2Snapshot cmdlet with the Owner and description filters to get a list of the available installation media snapshots.

    PS C:\> Get-EC2Snapshot -Owner amazon -Filter @{ Name="description"; Values="Windows*" }
  2. In the output, note the ID of the snapshot that matches your system architecture and language preference. For example:

    ... DataEncryptionKeyId : Description : Windows 2019 English Installation Media Encrypted : False KmsKeyId : OwnerAlias : amazon OwnerId : 123456789012 Progress : 100% SnapshotId : snap-22da283e StartTime : 10/25/2019 8:00:47 PM State : completed StateMessage : Tags : {} VolumeId : vol-be5eafcb VolumeSize : 6 ...
  3. Use the New-EC2Volume cmdlet to create a volume from the snapshot. Specify the same Availability Zone as your instance.

    PS C:\> New-EC2Volume -AvailabilityZone us-east-1a -VolumeType gp2 -SnapshotId snap-22da283e
  4. In the output, note the volume ID.

    Attachments : {} AvailabilityZone : us-east-1a CreateTime : 4/18/2017 10:50:25 AM Encrypted : False Iops : 100 KmsKeyId : Size : 6 SnapshotId : snap-22da283e State : creating Tags : {} VolumeId : vol-06aa9e1fbf8b82ed1 VolumeType : gp2
  5. Use the Add-EC2Volume cmdlet to attach the volume to your instance.

    PS C:\> Add-EC2Volume -InstanceId i-087711ddaf98f9489 -VolumeId vol-06aa9e1fbf8b82ed1 -Device xvdh
  6. Connect to your instance and make the volume available. For more information, see Make an Amazon EBS volume available for use in the Amazon EBS User Guide.

    Important

    Do not initialize the volume.

  7. Open Control Panel, Programs and Features. Choose Turn Windows features on or off. If you are prompted for installation media, specify the EBS volume with the installation media.

  8. (Optional) When you are finished with the installation media, use the Dismount-EC2Volume cmdlet to detach the volume from your instance. After you detach the volume, you can use the Remove-EC2Volume cmdlet to delete the volume.