Enable Amazon EBS optimization for an Amazon EC2 instance
You can manually enable Amazon EBS optimization only for instances types that optionally support Amazon EBS
optimization, but are not Amazon EBS-optimized by default. For these instance types you can
enable Amazon EBS optimization during or after launch for an additional hourly fee
- Console
-
To enable Amazon EBS optimization during launch
In the Launch instances wizard, select the required instance type. Expand the Advanced details section, then for EBS-optimized instance, select Enable.
If the selected instance type does not support Amazon EBS optimization, the drop-down is disabled. If the instance type is Amazon EBS-optimized by default, Enable is already selected.
To enable Amazon EBS optimization after launch
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Instances, and select the instance.
-
Stop the instance. Choose Actions, Instance state, Stop instance.
Warning
When you stop an instance, the data on any instance store volumes is erased. To keep data from instance store volumes, be sure to back it up to persistent storage.
-
With the instance still selected, choose Actions, Instance settings, Change instance type.
-
Select EBS-optimized and then choose Apply.
If the instance type is Amazon EBS-optimized by default, or if it does not support Amazon EBS optimization, the checkbox is disabled.
-
Restart the instance. Choose Instance state, Start instance.
- Command line
-
To enable Amazon EBS optimization during launch
You can use one of the following commands with the corresponding option.
-
run-instances with
--ebs-optimized
(AWS CLI) -
New-EC2Instance with
-EbsOptimized
(AWS Tools for Windows PowerShell)
To enable Amazon EBS optimization after launch
-
If the instance is running, stop it using one of the following commands.
stop-instances (AWS CLI)
Stop-EC2Instance (AWS Tools for Windows PowerShell)
Warning
When you stop an instance, the data on any instance store volumes is erased. To keep data from instance store volumes, be sure to back it up to persistent storage.
-
Enable EBS optimization using one of the following commands with the corresponding option:
-
modify-instance-attribute with
--ebs-optimized
(AWS CLI) -
Edit-EC2InstanceAttribute with
-EbsOptimized
(AWS Tools for Windows PowerShell)
-
-