Skip to main content
emnode
Compliance Medium severity

AWS Security Hub · EC2

EC2.7: New EBS volumes are not encrypted by default

Written and reviewed by Emnode · Last reviewed

What does AWS Security Hub EC2.7 check?

EC2.7 checks the account-level EBS default-encryption toggle and fails in any region where it is off. The setting is per-region and historically defaults to off everywhere, so the control evaluates each enabled region independently: a single account can pass in one region and fail in five others.

Why does EC2.7 matter?

With the default off, every new volume (root volumes from AMIs, launch-template disks, ad-hoc CreateVolume calls) is created unencrypted unless someone remembers to opt in. Each one then seeds unencrypted snapshots, AMIs, and backup chains. It is the auditor's "what stops the next volume being unencrypted?" question, and the honest answer needs to be the regional default, not vigilance.

How do I fix EC2.7?

  1. Enumerate every enabled region with describe-regions, then call get-ebs-encryption-by-default against each to find where EC2.7 fails.
  2. Decide on the AWS-managed aws/ebs key (free, zero ops) versus a customer-managed CMK if your compliance regime requires key custody.
  3. Loop enable-ebs-encryption-by-default across every region (the call is idempotent), then verify true everywhere.
  4. Add the AWS Config rule ec2-ebs-encryption-by-default and an SCP denying ec2:DisableEbsEncryptionByDefault so the setting cannot drift back off.

Remediation script · bash

# 1. Flip the EBS default across every enabled region (idempotent, free, new volumes only).
for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
  aws ec2 enable-ebs-encryption-by-default --region "$region" >/dev/null
  echo "$region: EBS default encryption on"
done

# 2. Inventory the immutable storage that needs migrating.
aws efs describe-file-systems \
  --query 'FileSystems[?Encrypted==`false`].[FileSystemId,Name,SizeInBytes.Value]' --output table
aws workspaces describe-workspaces \
  --query 'Workspaces[?RootVolumeEncryptionEnabled==`false`].[WorkspaceId,UserName]' --output table

# 3. Create an encrypted EFS replacement (then migrate data with AWS DataSync, cut over, delete source).
aws efs create-file-system --encrypted \
  --kms-key-id alias/storage-encryption \
  --performance-mode generalPurpose --throughput-mode elastic

# 4. Confirm the default holds, then back it with a Config rule and an SCP.
aws ec2 get-ebs-encryption-by-default --query 'EbsEncryptionByDefault'

Full walkthrough (console steps, edge cases and verification) in the lesson Encrypt EBS and EFS storage at rest.

Is EC2.7 a false positive?

Teams flip the toggle in their home region years ago and assume it is account-wide. It is per-region, and regions enabled later start off, so EC2.7 keeps firing on regions nobody remembers opening. The toggle also only protects new volumes; existing unencrypted volumes (EC2.3) still need separate migration.

Part of the learning path Encrypt everything
  • EC2.1 An EBS snapshot is publicly restorable by any account
  • EC2.2 Default security groups still allow traffic
  • EC2.3 Attached EBS volumes are not encrypted at rest
  • EC2.4 Long-stopped instances are abandoned attack surface
  • EC2.6 No VPC flow logs, so there is no network audit trail
  • EC2.8 IMDSv1 lets an SSRF steal instance credentials
  • EC2.9 Instances are directly reachable on public IPv4
  • EC2.10 EC2 API traffic leaves the VPC over the internet
  • EC2.13 SSH (port 22) is open to the entire internet
  • EC2.14 RDP (port 3389) is open to the entire internet
  • EC2.15 Subnets auto-assign public IPs to new instances
  • EC2.17 Instances with multiple ENIs can bridge network boundaries