Open menu
-->

EBS General Purpose SSD Volume Type

Cloud Conformity allows you to automate the auditing process of this resolution page. Register for a 14 day evaluation and check your compliance level for free!

Start a Free Trial Product features
Cost
optimisation

Ensure that your EC2 instances are using General Purpose SSD (gp2) EBS volumes instead of Provisioned IOPS SSD (io1) volumes for cost-effective storage that fits a broad range of workloads. Unless you are running mission-critical applications that need more than 10000 IOPS or 160 MiB/s of throughput per volume, Cloud Conformity recommends converting your io1 EBS volumes to gp2-type volumes in order to lower the cost of your monthly AWS bill while maintaining the same I/O performance. For example, if your application requirements are 100GB storage and 600 IOPS (input/output operations per second) you can save roughly $31 per month using gp2 EBS volumes instead of io1 volumes as an io1-type EBS volume with 600 IOPS and 100GB storage costs $51.50/month while a gp2 volume with 600 IOPS and 200GB storage costs only $20.00/month (as of November 2016).

This rule resolution is part of the Cloud Conformity Cost Optimisation Package

Using General Purpose SSD (gp2) volumes instead of Provisioned IOPS SSD (io1) volumes represents a good strategy to cut down on EBS costs because for gp2-type volumes you only pay for the storage compared to io1 volumes where you pay for both storage and IOPS. Converting existing io1 resources to gp2 is often possible by configuring larger storage which gives higher baseline performance of IOPS for a lower cost.

Audit

To determine the type of your existing EBS volumes, perform the following:

Using AWS Console

01 Login to the AWS Management Console.

02 Navigate to EC2 dashboard at https://console.aws.amazon.com/ec2/.

03 In the left navigation panel, under Elastic Block Store, click Volumes.

04 Choose the EBS volume that you want to examine.

05 Select the Description tab from the bottom panel and check the Volume type property value. If the current value is set to io1:

Select the Description tab from the bottom panel and check the Volume type property value. If the current value is set to io1

the volume type used is Provisioned IOPS SSD, therefore the selected EBS volume is not optimized with respect to cost. To convert an io1-type EBS volume to a gp2 one, follow the steps outlined in the Remediation/Resolution section of the conformity rule.

06 Repeat step no. 4 and 5 to verify the type of other EBS volumes provisioned in the current region.

07 Change the AWS region from the navigation bar and repeat the process for the other regions.

Using AWS CLI

01 Run describe-volumes command (OSX/Linux/UNIX) using custom query filters to list the IDs of the EBS volumes provisioned in the selected AWS region:

aws ec2 describe-volumes
	--region us-east-1
	--output table
	--query 'Volumes[*].VolumeId'

02 The command output should return a table with the requested volume IDs:

-------------------
| DescribeVolumes |
+-----------------+
|  vol-8847905c   |
|  vol-4fe12ad3   |
|  vol-51c790a8   |
|  vol-2a3f9009   |
+-----------------+

03 Run again describe-volumes command (OSX/Linux/UNIX) using the volume ID returned at the previous step and appropriate filtering to expose the volume type for the selected EBS resource:

aws ec2 describe-volumes
	--region us-east-1
	--volume-ids vol-8847905c
	--query 'Volumes[*].VolumeType'

04 The command output should return the type of the selected volume:

[
    "io1"
]

If the value returned by the command output is "io1", the volume type used is Provisioned IOPS SSD, therefore the selected EBS volume is not optimized to run as cost-effective storage AWS resource.

05 Repeat steps no. 3 and 4 to verify the type of other EBS volumes available in the current region.

06 Change the AWS region by updating the --region command parameter value and repeat steps no. 1 - 5 to perform the audit process for other regions.

Remediation / Resolution

To convert your Provisioned IOPS SSD (io1) EBS volumes to General Purpose SSD (gp2) volumes, you need to recreate them with the optimal configuration by perform the following:

Using AWS Console

01 Login to the AWS Management Console.

02 Navigate to EC2 dashboard at https://console.aws.amazon.com/ec2/.

03 In the left navigation panel, under Elastic Block Store, click Volumes.

04 Choose the EBS volume that you want to convert (see Audit section part I to identify the right resource).

05 Click the Actions dropdown button from the EBS dashboard top menu and select Create Snapshot.

06 In the Create Snapshot dialog box, provide a name and a description for the snapshot then click Create to take the snapshot.

07 In the navigation panel, under Elastic Block Store, click Snapshots.

08 Select your newly created EBS volume snapshot.

09 Click the Actions dropdown button from the EBS dashboard top menu and select Create Volume.

10 In the Create Volume dialog box, perform the following actions:

  1. Select General Purpose SSD (GP2) from the Volume Type dropdown list.
  2. In the Size (GiB) box, enter the volume storage size in GiB required to match the IOPS number of the existing EBS volume (io1), number displayed next to the IOPS section: IOPS section.
  3. From the Availability Zone dropdown list select the right Availability Zone in which to create the EBS volume.
  4. Click Create to provision the new gp2-type EBS volume.

11 Go back to the navigation panel and under Elastic Block Store click Volumes.

12 Select the original (io1-type) EBS volume. (!) IMPORTANT: If the selected EBS volume is the root device of an EC2 instance, you must first stop the instance in order to detach the volume, action that will trigger an immediate outage.

13 Click the Actions dropdown button from the dashboard top menu and select Detach Volume.

14 In the Detach Volume dialog box click Yes, Detach.

15 Now select the General Purpose SSD EBS volume created at step no. 10.

16 Click the Actions dropdown button from the dashboard top menu and select Attach Volume.

17 In the Attach Volume dialog box perform the following:

  1. In the Instance box, enter the ID of the EC2 instance that is using the volume.
  2. In the Device box enter the device name for attachment, e.g. /dev/sdf. Make sure you are using the original EBS volume attachment name.
  3. Click Attach to attach the new volume to the selected instance. The volume status should change from available to in-use. If the selected EBS volume is the root device of the EC2 instance, you must start now the instance.

18 Repeat steps no. 4 - 17 to convert other io1 EBS volumes provisioned in the current region to gp2.

19 Change the AWS region from the navigation bar and repeat the process for other regions.

Using AWS CLI

01 Run describe-volumes command (OSX/Linux/UNIX) using the ID of the EBS volume that you want to convert to gp2 (see Audit section part II to identify the right resource) to describe the configuration information for the selected volume:

aws ec2 describe-volumes
	--region us-east-1
	--volume-ids vol-8847905c

02 The command output should return the requested volume configuration metadata, information that will be useful later when the new (gp2) volume will be created:

{
    "Volumes": [
        {
            "AvailabilityZone": "us-east-1d",
            "Attachments": [
                {
                    "AttachTime": "2015-10-20T15:15:26.000Z",
                    "InstanceId": "i-0ed9c9decdc99113d",
                    "VolumeId": "vol-8847905c",
                    "State": "attached",
                    "DeleteOnTermination": false,
                    "Device": "/dev/xvda"
                }
            ],
            "Encrypted": false,
            "VolumeType": "io1",
            "VolumeId": "vol-8847905c",
            "State": "in-use",
            "Iops": 600,
            "SnapshotId": "snap-2a2a8752",
            "CreateTime": "2015-10-21T10:45:27.998Z",
            "Size": 100
        }
    ]
}

03 Run create-snapshot command (OSX/Linux/UNIX) to create a new snapshot from the selected io1 EBS volume using its ID as identifier:

aws ec2 create-snapshot
	--region us-east-1
	--volume-id vol-8847905c

04 The command output should return the new snapshot metadata:

{
    "Description": "",
    "Encrypted": false,
    "VolumeId": "vol-8847905c",
    "State": "pending",
    "VolumeSize": 100,
    "Progress": "",
    "StartTime": "2016-10-25T15:24:34.000Z",
    "SnapshotId": "snap-edaacf61",
    "OwnerId": "123456789012"
}

05 Run create-volume command (OSX/Linux/UNIX) to provision a new EBS volume from the newly created snapshot. The following command example describes creating a gp2-type EBS volume with 200GB storage (providing 600 IOPS) from a source snapshot with the ID snap-edaacf61:

aws ec2 create-volume
	--region us-east-1
	--availability-zone us-east-1d
	--snapshot-id snap-edaacf61
	--volume-type gp2
	--size 200
	--iops 600

06 The command output should return the new General Purpose SSD EBS volume metadata:

{
    "AvailabilityZone": "us-east-1d",
    "Encrypted": false,
    "VolumeType": "gp2",
    "VolumeId": "vol-b7a47563",
    "State": "creating",
    "Iops": 600,
    "SnapshotId": "snap-edaacf61",
    "CreateTime": "2016-10-25T15:36:19.344Z",
    "Size": 200
}

07 Run detach-volume command (OSX/Linux/UNIX) using the ID of the io1-type volume in use to detach it safely from its EC2 instance. (!) IMPORTANT: If the selected EBS volume is the root device of an EC2 instance, you must first stop the instance in order to detach the volume, action that will trigger an immediate outage. The following command example describes detaching an EBS volume with the ID vol-8847905c:

aws ec2 detach-volume
	--region us-east-1
	--volume-id vol-8847905c

08 The command output should return the request metadata:

{
    "AttachTime": "2015-10-20T15:42:46.000Z",
    "InstanceId": "i-0ed9c9decdc99113d",
    "VolumeId": "vol-8847905c",
    "State": "detaching",
    "Device": "/dev/sdf"
}

09 Now run attach-volume command (OSX/Linux/UNIX) to attach the new EBS volume (gp2) created at step no. 5 to your EC2 instance:

aws ec2 attach-volume
	--region us-east-1
	--volume-id vol-b7a47563
	--instance-id i-0ed9c9decdc99113d
	--device /dev/sdf

10 The command output should return the metadata for the gp2-type EBS volume attached:

{
    "AttachTime": "2016-10-25T15:49:55.398Z",
    "InstanceId": "i-0ed9c9decdc99113d",
    "VolumeId": "vol-b7a47563",
    "State": "attaching",
    "Device": "/dev/sdf"
}

11 Repeat steps no. 1 - 10 to convert other io1 EBS volumes provisioned in the current region to gp2 volumes.

12 Change the AWS region by updating the --region command parameter value and repeat steps no. 1 - 11 to perform the entire process for other regions.

References

Publication date Oct 26, 2016