π AWS EBS Snapshot is publicly accessible π’
- Contextual name: π EBS Snapshot is publicly accessible π’
- ID:
/ce/ca/aws/ec2/ebs-snapshot-public
- Located in: π AWS EC2
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- AWS Security Hub
- [[EC2.1] Amazon EBS snapshots should not be publicly restorable]([EC2.1] Amazon EBS snapshots should not be publicly restorable (https://docs.aws.amazon.com/securityhub/latest/userguide/ec2-controls.html#ec2-1)]
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Ensure that AWS EBS snapshots are not publicly accessible. By default, EBS snapshots are private and should remain so unless there is a specific, justified use case for sharing. Public access to snapshots is generally considered a security risk and is rarely appropriate.
Rationalβ
When an EBS snapshot is marked as public, it becomes accessible to all AWS accounts, allowing any user to create volumes based on its data. If the snapshot contains confidential or sensitive information, this misconfiguration can result in unintended data exposure and potentially severe security breaches. In most cases, publicly sharing a snapshot is accidental or the result of a misunderstanding of the implications.
Auditβ
This policy flags an AWS EBS Snapshot as
INCOMPLIANT
if thePublic Accessible
field is set to Yes.
Remediationβ
Remediationβ
From Command Lineβ
To revoke public access to an EBS snapshot, run the following command:
aws ec2 modify-snapshot-attribute \
--snapshot-id {{snapshot-id}} \
--attribute createVolumePermission \
--operation-type remove \
--group-names allIf you need to share the snapshot with specific AWS accounts (instead of making it public), you can grant access to individual account IDs using:
aws ec2 modify-snapshot-attribute \
--snapshot-id {{snapshot-id}} \
--attribute createVolumePermission \
--operation-type add \
--user-ids {{123456789012}} {{111122223333}}Replace
{{user-ids}}
with the appropriate AWS account IDs.