Description
EBS optimization provides dedicated bandwidth between EC2 and EBS. Some instance types enable it even when ebs_optimized is omitted.
Potential impact
Storage latency can rise when a workload reaches the IOPS or throughput limit of either the instance or its volumes.
Remediation
Check the instance type’s default. Set ebs_optimized = true if the type offers optional optimization and the workload needs it. Compare actual IOPS and throughput with both instance and volume limits.
Examples
Both examples use t3.small, which is already EBS-optimized. Adding the flag leaves its performance limits unchanged. Supply an AMI valid in the target Region.
Before
hcl
resource "aws_instance" "app" {
ami = "ami-1234567890abcdef0"
instance_type = "t3.small"
}
After
hcl
resource "aws_instance" "app" {
ami = "ami-1234567890abcdef0"
instance_type = "t3.small"
ebs_optimized = true
}