Ensure Public Access to EBS Snapshots is Disabled
Description
To protect your data disable the public mode of EBS snapshots.
Rationale
This protects your data so that it is not accessible to all AWS accounts preventing accidental access and leaks.
Impact
Removing public access from EBS snapshots may affect other AWS accounts that rely on them. Ensure private sharing is configured for any authorized accounts.
Audit Procedure
Using AWS CLI
- For each snapshot, run:
aws ec2 describe-snapshot-attribute \
--snapshot-id <snapshot-ID> \
--attribute createVolumePermission
- Validate
Groupis not set to all.
Using AWS Console
- Login to the EC2 console at https://console.aws.amazon.com/ec2/.
- In the left pane click
Snapshots. - Select the
snapshotthen clickActions, Modify Permissions. - Confirm that the snapshot is set to
Private. - Repeat for any additional Snapshots, Regions and AWS accounts.
If the snapshot is set to public refer to the remediation below.
Expected Result
The createVolumePermission attribute should not contain a Group set to "all". In the console, all snapshots should show as Private.
Remediation
Using AWS CLI
- For each snapshot, run:
aws ec2 modify-snapshot-attribute \
--snapshot-id <snapshot-ID> \
--attribute createVolumePermission \
--operation remove --group-name all
Using AWS Console
- Login to the EC2 console at https://console.aws.amazon.com/ec2/.
- In the left pane click
Snapshots. - Select the
snapshotthen click 'Actions, Modify Permissions'. - Click the radio button for
Private. - Click
Save. - Repeat for any additional Snapshots, Regions and AWS accounts.
Default Value
By default, EBS snapshots are private when created.
References
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-snapshot-attribute.html
Additional Information
- Snapshots are constrained to the Region in which they were created. To share a snapshot with another Region, copy the snapshot to that Region.
- AWS prevents you from sharing snapshots that were encrypted with your default CMK. Snapshots that you intend to share must instead be encrypted with a customer managed CMK.
- The public option is not valid for encrypted snapshots or snapshots with an AWS Marketplace product code.
CIS Controls
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 3.3 Configure Data Access Control Lists | x | x | x |
| v7 | 14.6 Protect Information through Access Control Lists | x | x | x |
Profile
Level 1 | Automated