This rule ensures EC2 instances have EBS optimization enabled.
Rule | EC2 instance should have EBS optimization enabled |
Framework | CISA-cyber-essentials |
Severity | ✔ High |
Rule Description:
EBS optimization enables Amazon EC2 instances to fully utilize the I/O capabilities of the attached Amazon Elastic Block Store (EBS) volumes. By enabling EBS optimization, the EC2 instance is optimized for better I/O performance and reduced latency. This rule ensures that EBS optimization is enabled for the EC2 instance to enhance its overall performance.
Troubleshooting Steps:
Verify EBS Optimization Setting:
Verify Compatible EC2 Instance Types:
Verify EBS Volume Configuration:
Necessary Code:
No specific code snippets are required for enabling EBS optimization, as it can be enabled directly through the AWS Management Console or AWS CLI.
Remediation Steps:
Enabling EBS Optimization through AWS Management Console:
Sign in to the AWS Management Console.
Open the Amazon EC2 service.
Navigate to the "Instances" section.
Select the EC2 instance for which you want to enable EBS optimization.
Click on the "Actions" button and select "Instance Settings" > "Change EBS optimization".
In the "Change EBS optimization" window, select "Enable" and click "Save".
Wait for the EBS optimization setting to be updated. This may take a few minutes.
Verify that the EBS optimization is now enabled by checking the EC2 instance's details.
Enabling EBS Optimization through AWS CLI:
Open the AWS CLI or any command-line interface tool supporting AWS CLI.
Use the following command to enable EBS optimization for the desired EC2 instance:
aws ec2 modify-instance-attribute --instance-id <instance-id> --ebs-optimized true
Replace
<instance-id>
with the ID of the EC2 instance you want to enable EBS optimization for.Wait for the command to complete and verify that the EBS optimization is now enabled.
Additional Information:
Enabling EBS optimization may incur additional charges for instances that do not come with EBS optimization by default. Check AWS Documentation and Pricing for detailed information about the associated costs.
EBS optimization is available for specific EC2 instance types. Review the AWS documentation to determine which instance types are eligible for EBS optimization.
Periodically check the EBS optimization setting for your EC2 instances to ensure it remains enabled, as configuration changes or instance modifications may alter this setting.