Join our Newsletter — 33% off our NHI Course
Home› Guides› How to Find Unencrypted or Publicly Shared EBS…
Guide Cloud Security

How to Find Unencrypted or Publicly Shared EBS Volumes and Snapshots: Inventory, Lock Down and Prevent Repeat Exposure

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 13 min read
On this page

Unencrypted Amazon EBS volumes and publicly shared EBS snapshots are two of the quietest ways that cloud data leaves an organisation, because nothing breaks when they exist and nobody gets an alert when a stranger restores a copy. This guide shows security and platform teams how to find both conditions across every Region and account, how to close them safely, and how to stop them coming back. It covers the AWS CLI calls that return public and unencrypted snapshots, the AWS Config rule for attached volumes, block public access for snapshots, encryption by default, and the identity questions that sit behind every snapshot share.

Snapshots matter to non-human identity (NHI) programmes because they are rarely just data. A snapshot of a build server, a database host or a bastion often carries configuration files, cached tokens, SSH keys and service account credentials. Anyone who can create a volume from a public snapshot can mount it and read those secrets. For the wider storage picture, see the Amazon S3 Security Guide; this page stays on block storage.

Key takeaways

  • A snapshot is public when its createVolumePermission attribute includes the group all. Any AWS account can then create a volume from it.
  • aws ec2 describe-snapshots --owner-ids self --restorable-by-user-ids all is the core query for finding your own public snapshots, and it must be run in every Region you use.
  • Only unencrypted snapshots can be shared publicly. Encryption is therefore both a confidentiality control and a structural brake on public exposure.
  • Block public access for EBS snapshots, in block all sharing mode, hides snapshots that are already public as well as blocking new public shares. It is Regional, applies to administrators too and has no additional cost.
  • EBS encryption by default is set per Region and has no effect on volumes that already exist. Existing unencrypted volumes need a planned migration.
  • Treat every public snapshot as a possible credential exposure: rotate secrets that lived on the source volume, not just the sharing setting.

Why unencrypted and public EBS data is a leak path

EBS volumes are block devices attached to EC2 instances. Snapshots are point-in-time copies of those volumes, stored by AWS and restorable into new volumes. Both can be encrypted with AWS KMS keys, and snapshots can be shared with other accounts by changing a permission attribute rather than by copying data anywhere.

That design has two consequences. First, an unencrypted snapshot needs no key to read. If its permission attribute is opened to everyone, the only control left is that the outsider must know or discover the snapshot ID, and public snapshots are listable by any account. Second, the share is a metadata change. It does not show up as a large data transfer from your account, because the person restoring the snapshot does so in their own account. The MITRE ATT&CK technique Data from Cloud Storage (T1530) describes adversaries collecting data from cloud storage, and a related technique, Transfer Data to Cloud Account (T1537), covers moving data into an account the adversary controls. Snapshot sharing fits both patterns.

Unencrypted volumes that are never shared are a lower but real risk. They fail most encryption-at-rest requirements, such as NIST SP 800-53 control SC-28 Protection of Information at Rest, and any snapshot taken from them inherits the unencrypted state, which keeps the public-share option open.

Step 1: Find publicly shared snapshots

The AWS CLI reference for describe-snapshots documents the parameter that matters. --restorable-by-user-ids accepts account IDs, self for snapshots you own or have explicit permissions for, and all for public snapshots. Combine it with --owner-ids self so you see only snapshots your account owns, rather than the large catalogue of public snapshots other accounts publish.

An illustrative loop across Regions might look like this:

for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do aws ec2 describe-snapshots --region "$r" --owner-ids self --restorable-by-user-ids all --query "Snapshots[].[SnapshotId,VolumeId,Encrypted,StartTime]" --output text; done

Run it with a read-only role in each account, or from a central security account that assumes a read-only role in each member account. Record the snapshot ID, source volume ID, Region, account, creation time and any tags. The source volume ID lets you work back to the instance and owning team.

To confirm the exact sharing state of a single snapshot, read its createVolumePermission attribute. The AWS documentation on sharing EBS snapshots explains that public sharing is the all group on that attribute, and private sharing is a list of 12-digit account IDs. Private shares deserve a review too: an account ID that belonged to a former supplier or a closed test account is a quieter version of the same exposure.

Check the console as a cross-check. In the EC2 console, the snapshot list can be filtered to show public snapshots, and the Snapshot settings, Modify permissions action shows whether a snapshot is Public or Private and which accounts it is shared with.

Step 2: Find unencrypted snapshots and volumes

The same describe-snapshots call supports a filter named encrypted with values true or false, and every snapshot in the output carries a boolean Encrypted field. An illustrative query for your own unencrypted snapshots in one Region is:

aws ec2 describe-snapshots --owner-ids self --filters Name=encrypted,Values=false --query "Snapshots[].[SnapshotId,VolumeId,VolumeSize,StartTime]" --output text

For volumes, the AWS Config managed rule ENCRYPTED_VOLUMES checks whether attached EBS volumes are encrypted. It reports NON_COMPLIANT when an attached volume is unencrypted, or when it is encrypted with a KMS key that is not in the optional kmsId parameter. It runs on configuration changes against the AWS::EC2::Volume resource type. Note the word attached: detached volumes, which are often forgotten copies, need a direct query. The EC2 describe-volumes call accepts an encrypted filter for this; confirm the filter name against the current CLI reference before you script it.

Deploy the Config rule through an organisation-wide conformance pack or your landing zone tooling so new accounts inherit it. The AWS Config Guide covers aggregators and organisation deployment.

Build a single inventory table with one row per volume or snapshot and these columns: account, Region, resource ID, encrypted (yes or no), KMS key, public (yes or no), private share account IDs, source instance, owner tag and last attached date. That table drives the rest of this guide.

Step 3: Triage and close public exposure

Work public snapshots first, because they are exposed now. For each one:

  1. Confirm the owner. Use tags and the source volume to find the team. Some public snapshots are deliberate, for example a vendor publishing a reference image. Those should live in a dedicated, documented publishing account, not in a workload account.
  2. Remove the public permission. Use modify-snapshot-attribute with --attribute createVolumePermission, --operation-type remove and --group-names all. The sharing documentation shows the matching add form.
  3. Assume compromise of contents. If the snapshot was public for any period, treat any secret on the source volume as exposed. That includes SSH host and user keys, cloud access keys in configuration files, database connection strings, API tokens, TLS private keys and service account files. Rotate them and revoke the old values.
  4. Check who used the share. Review AWS CloudTrail for ModifySnapshotAttribute events to find who opened the snapshot and when. The AWS CloudTrail Guide explains how to query management events across accounts.
  5. Record the incident. Even if there is no evidence of access, a public snapshot containing personal data may trigger internal or regulatory reporting duties. Involve your privacy team early.

The Secrets in Backups and Snapshots guide goes deeper on finding and rotating credentials that hide in copies of systems.

Step 4: Turn on block public access for snapshots

After cleanup, prevent recurrence. AWS documents block public access for Amazon EBS snapshots with two modes:

ModeEffect on new public sharesEffect on snapshots already public
Block all sharingBlockedTreated as private and no longer publicly available
Block new sharingBlockedRemain publicly available

Key points from the documentation:

  • The setting is Regional. You must enable it in each Region where you want to prevent public sharing, including Regions you do not use, so that an attacker or a careless script cannot use them instead.
  • It applies to all users in the account, including administrators.
  • In block all sharing mode, already-public snapshots stay marked as publicly shared but are not visible or accessible. If the setting is later disabled or switched to block new sharing, they become public again. Fix the underlying permission as well, so that a future setting change does not re-expose them.
  • An AWS Organizations declarative policy can apply the setting across accounts and Regions at once, and when one is in use the setting cannot be changed directly in the account.
  • It does not stop private sharing to specific accounts.
  • It does not stop public sharing of EBS-backed AMIs. Block public access for AMIs is a separate setting and should be enabled too.
  • It is not supported for local snapshots on AWS Outposts, and it has no additional cost.

Choose block all sharing as the default. Use block new sharing only as a short transition if you have legitimate public snapshots and need time to move them to a publishing account. Prefer the declarative policy route for organisations, because it removes the ability of a compromised account administrator to turn the protection off.

Step 5: Enable encryption by default and migrate old volumes

The CLI reference for enable-ebs-encryption-by-default states that once the setting is enabled, every EBS volume you create in that Region is encrypted, using the default KMS key or a key you specify at creation. It applies only to the Region in effect for the command, and it has no effect on the encryption status of existing volumes. It also prevents launching instance types that do not support encryption, so test before enabling it in Regions that run older instance families.

A practical rollout:

  1. Decide on the key. A customer managed KMS key gives you control over the key policy, rotation and who can use it. If you later need to share encrypted snapshots privately, the sharing documentation is clear that only snapshots encrypted with a customer managed key can be shared, and the key must be shared too. The AWS KMS Security Guide covers key policy design.
  2. Enable encryption by default in every Region, with the chosen default key, through your account baseline automation.
  3. For existing unencrypted volumes, take a snapshot, copy it with encryption enabled, create a new volume from the encrypted copy and swap it in during a maintenance window. Root volumes generally require building a new encrypted AMI or replacing the instance.
  4. Delete the old unencrypted snapshots once the encrypted replacement is verified and retention rules allow. Unencrypted leftovers keep the public-share option alive.

Step 6: Control who can share snapshots

Snapshot exposure is an identity problem as much as a storage one. The permission that matters is the ability to call ModifySnapshotAttribute. In many accounts it sits inside broad administrator or power user policies, and also inside the roles used by backup tools, CI pipelines and image builders. Those non-human identities run without a person watching each action.

  • Inventory every IAM role and user that can modify snapshot attributes, including automation roles.
  • Remove the permission from roles that only need to create or delete snapshots. Apply NIST SP 800-53 AC-6 Least Privilege as the test.
  • Use service control policies or permission boundaries to deny public snapshot sharing in workload accounts. Pair that with block public access so there are two independent controls.
  • Restrict cross-account private sharing to an approved list of account IDs, and review that list at least quarterly.
  • Monitor KMS key policies too: sharing an encrypted snapshot privately requires sharing the key, so a key grant to an unknown account is a signal worth alerting on.

Step 7: Detect and alert continuously

Point-in-time scans miss short exposures. Add continuous signals:

  • CloudTrail alerting on ModifySnapshotAttribute where the request adds the group all, and on changes to the block public access setting or encryption-by-default setting. Treat a disable event in a workload account as a high-severity alert.
  • AWS Config with ENCRYPTED_VOLUMES across all accounts, aggregated centrally, with noncompliance routed to the owning team's queue.
  • Scheduled inventory running the public and unencrypted snapshot queries daily across Regions, as a backstop for Regions where the Config rule or alerts are missing.
  • Logging protection. An attacker who shares a snapshot may also try to disable logging first. The guide on How to detect attackers disabling cloud audit logging covers that pattern.

Common failure patterns

  • Scanning one Region. Snapshots are Region-bound, and so are the controls. A scan of the main Region misses copies made for disaster recovery elsewhere.
  • Fixing the setting but not the secrets. Removing the public permission ends future exposure, but anything already restored by an outsider stays with them. Credential rotation is the real remediation.
  • Relying on block all sharing alone. Previously public snapshots keep their public marking and reappear if the setting is ever relaxed.
  • Assuming encryption by default fixed old volumes. It applies only to volumes created after it is enabled.
  • Ignoring detached volumes. The Config rule checks attached volumes, so orphaned volumes from terminated instances can sit unencrypted for years.
  • Forgetting AMIs. EBS-backed AMIs have their own public sharing and their own block public access setting.
  • Broad automation roles. Backup and image pipeline identities that can modify snapshot attributes are an easy route to a public share, whether by bug or by compromise.
  • No owner tags. Without ownership, cleanup stalls and public snapshots stay open while teams argue about who can delete them.

Practitioner checklist

  • Run the public snapshot query with --owner-ids self --restorable-by-user-ids all in every Region of every account.
  • Run the unencrypted snapshot query and a detached volume query, and deploy ENCRYPTED_VOLUMES organisation-wide.
  • Remove public permissions, then rotate every secret that lived on the source volumes.
  • Review private share account IDs and remove any that are unknown or obsolete.
  • Enable block public access for snapshots in block all sharing mode in all Regions, ideally through a declarative policy.
  • Enable block public access for AMIs as well.
  • Enable encryption by default in every Region with a customer managed key, and plan migration of existing unencrypted volumes.
  • Remove ModifySnapshotAttribute from roles that do not need it, including automation roles, and deny public shares by policy.
  • Alert on public share attempts and on any change to block public access or encryption-by-default settings.
  • Require owner tags on volumes and snapshots, and delete unencrypted leftovers after migration.

Standards and references

Related NHI Mgmt Group resources: Amazon S3 Security Guide · Secrets in Backups and Snapshots · AWS KMS Security Guide · AWS Config Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.