For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cloudformation-aws-ec2-not-ebs-optimized.md.
A documentation index is available at /llms.txt.
EC2 instances should be EBS-optimized to ensure dedicated throughput and reduced I/O contention between instance network traffic and Amazon EBS volumes. This improves disk performance, lowers latency spikes, and helps maintain application availability under load.
For AWS::EC2::Instance resources, the Properties.EbsOptimized property must be defined and set to true for instance types that are not EBS-optimized by default. Resources missing EbsOptimized or with EbsOptimized set to false will be flagged. Instance types that are EBS-optimized by default are exempt.
Note: If InstanceType is omitted, CloudFormation defaults to m1.small, which is not EBS-optimized by default and should have EbsOptimized set to true explicitly set.