EBS volumes don't initialize on Windows Server 2016 and later AMIs

Instances created from Windows Server 2016 and later Amazon Machine Images (AMIs) use the EC2Launch service for a variety of startup tasks, including initializing EBS volumes. By default, EC2Launch does not initialize secondary volumes. You can configure EC2 Launch to initialize these disks automatically. Take your career to new heights of success with a AWS Online Training.

To map drive letters to volumes

  1. Connect to the instance to configure and open the C:\ProgramData\Amazon\EC2-Windows\Launch\Config\DriveLetterMappingConfig.json file in a text editor.

  2. Specify the volume settings using the following format:

      "driveLetterMapping": [
          "volumeName": "sample volume", "driveLetter": "H" } ] }
  3. Save your changes and close the file.

  4. Open Windows PowerShell and use the following command to run the EC2Launch script that initializes the disks:

    PS C:\>  C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeDisks.ps1

    To initialize the disks each time the instance boots, add the -Schedule flag as follows:

    PS C:\>  C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeDisks.ps1 -Schedule
More questions in this forum