๐ก๏ธ AWS EBS Snapshot is publicly accessible๐ข
- Contextual name: ๐ก๏ธ EBS Snapshot is publicly accessible๐ข
- ID:
/ce/ca/aws/ec2/ebs-snapshot-public - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- AWS Security Hub: [EC2.1] Amazon EBS snapshots should not be publicly restorable
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
INCOMPLIANTif thePublic Accessiblefield 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.