Skip to main content

Triage and Remediation

Remediation

Using Console

  1. Sign in to the AWS Management Console.
  2. Navigate to the EC2 service.
  3. Select Snapshots from the navigation pane.
  4. Identify public snapshots:
    • Look for snapshots listed in the console that have permissions set to “all”.
  5. Select the public snapshot.
  6. Modify Snapshot Permissions:
    • Click on Actions > Modify Snapshot Permissions.
    • Remove the “all” group permission if it exists.
    • Add or modify permissions as necessary.
  7. Repeat for other public snapshots:
    • Repeat the above steps for all public snapshots identified.

  1. List EBS Snapshots:
  1. Identify public snapshots:
    • Look for snapshots where the volume permissions include the “all” group.
  2. Modify Snapshot Permissions:
Replace SNAPSHOT_ID with the identifier of the public snapshot. 4. Repeat for other public snapshots:
  • Repeat the modification command for all public snapshots identified.
Here’s a Python script to identify and remediate public EBS snapshots:
This Python script identifies public EBS snapshots by checking if the permissions include the “all” group and then remediates them by removing the permission.Ensure to have appropriate IAM permissions for modifying EBS snapshots if you’re using AWS CLI or Python script.
This change mirrors --operation-type remove --group-names all by ensuring no aws_ebs_snapshot_create_volume_permission exists with group_names = ["all"]; it only alters permissions and does not replace the snapshot itself.To verify, terraform plan should show the aws_ebs_snapshot_create_volume_permission resource that had group_names = ["all"] being destroyed (or updated to remove group_names = ["all"]) with no replacement of the aws_ebs_snapshot resource.