Ahmad walks you through
installing Windows features
on an EC2 instance


I want to use the .NET Framework 3.5 on my Amazon EC2 Windows instance, but I’m not able to install it by using Add Roles and Features when setting up my instance. How do I install .NET Framework 3.5 on my instance?

You can install .NET Framework 3.x from the Add Roles and Features wizard when setting up a Windows Server 2012 or 2012 R2 instance, but you must first gain access to files that aren’t available on the base AMI.

AWS provides public EBS snapshots that include these extra files. You can create a volume from one of these snapshots, attach the volume to your instance, and use the new volume to install programs or features that aren’t included in the base Windows AMI.

Attach Windows installation media to provide required files by following these instructions:

Find and attach the EBS volume

1.    Find the snapshot ID for the Windows installation media that corresponds to the region your EC2 instance is in at Configuring Windows Components on Amazon EC2.

2.    Open the Amazon EC2 console. From the left navigation bar, choose Snapshots.

3.    Open the drop-down menu under Create Snapshot, and choose Public Snapshots.

4.    Locate the Windows installation media snapshot with the query ‘Snapshot ID : <snapshotID>' where <snapshotid> matches the Windows installation media snapshot ID for your region at Configuring Windows Components on Amazon EC2.

5.    Select the snapshot, open the Actions menu, and choose Create volume.
When you create the volume, be sure to select the Availability Zone that corresponds to the Availability Zone for your EC2 instance.

6.    In the Create Volume dialog box, choose the Create button.

7.    From the left navigation bar, choose Volumes.

8.    Select the new volume, open the Actions menu, choose Attach Volume, enter your EC2 Windows instance ID, and choose Attach.

Bring the volume online

To bring the volume online, follow these steps:

1.    Connect to your instance using the Remote Desktop Protocol (RDP) as described at Connecting to Your Windows Instance Using RDP. Be sure to log on with an account that is a member of the local Administrators group for the EC2 Windows instance.

2.    Open the Computer Management or Disk Management MMC snap-in:

3.    Right-click the Start button to display a shortcut menu.

•    If Disk Management is listed in the shortcut menu, choose Disk Management to open the Disk Management MMC snap-in and proceed to step 3.

•    If Disk Management is not listed in the shortcut menu, choose Run.

•    Type cmd.exe and press Enter to open a Windows Command prompt.

•    Type compmgmt.msc into the Windows Command prompt and press Enter; this will open the Computer Management MMC snap-in.

•    Select and expand Storage to display Disk Management.

•    Choose Disk Management.

3.    From the list of volumes displayed in Disk Management, choose the new volume.

4.    Right-click the disk that corresponds to the new volume.

5.    Choose the Online option.

Install the .NET Framework

After you bring the disk online, follow these steps to install the .NET Framework on your EC2 Windows instance:

1.    In Server Manager, choose Manage and then select Add Roles and Features to start the Add Roles and Features Wizard.

2.    On the Select installation type screen, choose Role-based or feature-based installation.

3.    Select the target server.

4.    On the Select features screen, check the box next to .Net Framework 3.5 Features.

5.    On the Confirm installation selections screen, a warning will be displayed asking Do you need to specify an alternate source path? If the target computer does not have access to Windows Update, use the Specify an alternate source path link to specify the path to the \sources\sxs folder on the installation media and then choose OK. After you have specified the alternate source, or if the target computer has access to Windows Update, click the X next to the warning, and then choose Install.

If you are using Server Manager in Windows Server 2012 to add a role or feature to a remote server, the remote server’s computer account (DOMAIN\ComputerName$) requires access to the alternate source file path because the deployment operation runs in the SYSTEM context on the target server.

Confirm the installation

You can run the following Windows PowerShell command in Windows Server 2012 R2 to verify that you have successfully installed the .NET Framework 3.5:

Get-WindowsOptionalFeature -Online | Where FeatureName -match "^NetFx(3|4-)"

If the .NET Framework was installed successfully, the command will display the following output: 

Feature Name     : NetFx3ServerFeatures

State            : Enabled

Feature Name     : NetFx3

State            : Enabled

If the .NET Framework was not installed successfully, the command will display the following output: 

Feature Name     : NetFx3ServerFeatures

State            : Disabled

Feature Name     : NetFx3

State            : DisabledWithPayloadRemoved

Detach the installation volume

After you have installed the .NET Framework, you can use the Disk Management tool from your EC2 Windows instance to take the volume offline, and then detach and delete the volume using the Amazon EC2 console.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-10-14

Updated: 2017-04-21