Add Instance Store Volumes to Your EC2 Instance
You specify the EBS volumes and instance store volumes for your instance using a block device mapping. Each entry in a block device mapping includes a device name and the volume that it maps to. The default block device mapping is specified by the AMI you use. Alternatively, you can specify a block device mapping for the instance when you launch it. For more information, see Block Device Mapping.
A block device mapping always specifies the root volume for the instance. The root volume is either an Amazon EBS volume or an instance store volume. For more information, see Storage for the Root Device. The root volume is mounted automatically. For instances with an instance store volume for the root volume, the size of this volume varies by AMI, but the maximum size is 10 GiB.
You can use a block device mapping to specify additional EBS volumes when you launch your instance, or you can attach additional EBS volumes after your instance is running. For more information, see Amazon EBS Volumes.
You can specify the instance store volumes for your instance only when you launch an instance. You can't attach instance store volumes to an instance after you've launched it.
The number and size of available instance store volumes for your instance varies by instance type. Some instance types do not support instance store volumes. For more information about the instance store volumes support by each instance type, see Instance Store Volumes. If the instance type you choose for your instance supports instance store volumes, you must add them to the block device mapping for the instance when you launch it. After you launch the instance, you must ensure that the instance store volumes for your instance are formatted and mounted before you can use them. Note that the root volume of an instance store-backed instance is mounted automatically.
Contents
Adding Instance Store Volumes to an AMI
You can create an AMI with a block device mapping that includes instance store volumes. After you add instance store volumes to an AMI, any instance that you launch from the AMI includes these instance store volumes. Note that when you launch an instance, you can omit volumes specified in the AMI block device mapping and add new volumes.
Important
For M3 instances, specify instance store volumes in the block device mapping of the instance, not the AMI. Amazon EC2 might ignore instance store volumes that are specified only in the block device mapping of the AMI.
To add instance store volumes to an Amazon EBS-backed AMI using the console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the navigation pane, choose Instances.
Select an instance, choose Actions, select Image, and then select Create Image.
In the Create Image dialog, add a meaningful name and description for your image.
For each instance store volume to add, choose Add New Volume, select an instance store volume from Type, and select a device name from Device. (For more information, see Device Naming on Linux Instances.) The number of available instance store volumes depends on the instance type.

Click Create Image.
To add instance store volumes to an AMI using the command line
You can use one of the following commands. For more information about these command line interfaces, see Accessing Amazon EC2.
create-image or register-image (AWS CLI)
ec2-create-image ec2-register (Amazon EC2 CLI)
Adding Instance Store Volumes to an Instance
When you launch an instance, the default block device mapping is provided by the specified AMI. If you need additional instance store volumes, you must add them to the instance as you launch it. Note that you can also omit devices specified in the AMI block device mapping.
Important
For M3 instances, you might receive instance store volumes even if you do not specify them in the block device mapping for the instance.
Important
For HS1 instances, no matter how many instance store volumes you specify in the block device mapping of an AMI, the block device mapping for an instance launched from the AMI automatically includes the maximum number of supported instance store volumes. You must explicitly remove the instance store volumes that you don't want from the block device mapping for the instance before you launch it.
To update the block device mapping for an instance using the console
Open the Amazon EC2 console.
From the dashboard, choose Launch Instance.
In Step 1: Choose an Amazon Machine Image (AMI), select the AMI to use and choose Select.
Follow the wizard to complete Step 1: Choose an Amazon Machine Image (AMI), Step 2: Choose an Instance Type, and Step 3: Configure Instance Details.
In Step 4: Add Storage, modify the existing entries as needed. For each instance store volume to add, click Add New Volume, select an instance store volume from Type, and select a device name from Device. The number of available instance store volumes depends on the instance type.

Complete the wizard to launch the instance.
To update the block device mapping for an instance using the command line
You can use one of the following options commands with the corresponding command. For more information about these command line interfaces, see Accessing Amazon EC2.
--block-device-mappingswith run-instances (AWS CLI)--block-device-mappingwith ec2-run-instances (Amazon EC2 CLI)-BlockDeviceMappingwith New-EC2Instance (AWS Tools for Windows PowerShell)
Making Instance Store Volumes Available on Your Instance
After you launch an instance, the instance store volumes are available to the instance, but you can't access them until they are mounted. For Linux instances, the instance type determines which instance store volumes are mounted for you and which are available for you to mount yourself. For Windows instances, the EC2Config service mounts the instance store volumes for an instance. The block device driver for the instance assigns the actual volume name when mounting the volume, and the name assigned can be different than the name that Amazon EC2 recommends.
Many instance store volumes are pre-formatted with the ext3 file system. SSD-based instance store volumes that support TRIM instruction are not pre-formatted with any file system. However, you can format volumes with the file system of your choice after you launch your instance. For more information, see Instance Store Volume TRIM Support. For Windows instances, the EC2Config service reformats the instance store volumes with the NTFS file system.
You can confirm that the instance store devices are available from within the instance itself using instance metadata. For more information, see Viewing the Instance Block Device Mapping for Instance Store Volumes.
For Windows instances, you can also view the instance store volumes using Windows Disk Management. For more information, see Listing the Disks Using Windows Disk Management.
For Linux instances, you can view and mount the instance store volumes as described in the following procedure.
To make an instance store volume available on Linux
Connect to the instance using an SSH client.
Use the
df -hcommand to view the volumes that are formatted and mounted. Use thelsblkto view any volumes that were mapped at launch but not formatted and mounted.To format and mount an instance store volume that was mapped only, do the following:
Create a file system on the device using the
mkfscommand.Create a directory on which to mount the device using the
mkdircommand.Mount the device on the newly created directory using the
mountcommand.

