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 AWS 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
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Snapshots.
-
From the Filter bar, choose Public snapshots.
-
Add the Owner Alias filter and choose amazon.
-
Add the Description filter and enter
Windows
. -
Press Enter
-
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.
-
Choose Actions, Create volume from snapshot.
-
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. -
In the Successfully created volume message (green banner), choose the volume that you just created.
-
Choose Actions, Attach volume.
-
From Instance, select the instance ID.
-
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.
-
Choose Attach volume.
-
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.
-
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.
-
(Optional) When you are finished with the installation media, you can detach the volume. After you detach the volume, you can delete it.
- AWS CLI
-
To add Windows components to your instance using the AWS CLI
-
Use the describe-snapshots command with the
owner-ids
parameter anddescription
filter to get a list of the available installation media snapshots.aws ec2 describe-snapshots --owner-ids amazon --filters Name=description,Values=Windows*
-
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" }, ... ] }
-
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-typegp2
--availability-zoneus-east-1a
-
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 }
-
Use the attach-volume command to attach the volume to your instance.
aws ec2 attach-volume --volume-id
vol-0c98b37f30bcbc290
--instance-idi-01474ef662b89480
--devicexvdg
-
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.
-
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.
-
(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
-
Use the Get-EC2Snapshot cmdlet with the
Owner
anddescription
filters to get a list of the available installation media snapshots.PS C:\>
Get-EC2Snapshot -Owner amazon -Filter @{ Name="description"; Values="Windows*" } -
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 ...
-
Use the New-EC2Volume cmdlet to create a volume from the snapshot. Specify the same Availability Zone as your instance.
PS C:\>
New-EC2Volume -AvailabilityZoneus-east-1a
-VolumeTypegp2
-SnapshotIdsnap-22da283e
-
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
-
Use the Add-EC2Volume cmdlet to attach the volume to your instance.
PS C:\>
Add-EC2Volume -InstanceIdi-087711ddaf98f9489
-VolumeIdvol-06aa9e1fbf8b82ed1
-Devicexvdh
-
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.
-
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.
-
(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.
-