IAM policy example: snapshot tagged EBS volumes, with a least privilege rewrite
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Allows a backup role to create snapshots of EBS volumes tagged Backup=true and to tag the new snapshots at creation. The original also allows deleting any snapshot, on all resources, so a compromised backup role could destroy the backups. The names and the account ID 111122223333 are AWS documentation placeholders.
Open the workbench ยท All examples
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Snapshots",
"Effect": "Allow",
"Action": [
"ec2:CreateSnapshot",
"ec2:CreateTags",
"ec2:DeleteSnapshot"
],
"Resource": "*"
}
]
}
What it allows
- Allows creating and deleting snapshots and tags on all resources in every Region.
What it allows
Allow 3 actions (ec2:CreateSnapshot, ec2:CreateTags, ec2:DeleteSnapshot) on every resource.
Action or pattern Actions Access levels ec2:CreateSnapshot1 Write 1 ec2:CreateTags1 Tagging 1 ec2:DeleteSnapshot1 Write 1
Checks
- Medium Allows 2 write or permissions-management actions on every resource ("Resource": "*"). AWS documentation for this check
Delete on all snapshots lets a compromised backup role destroy the backups it made and those of other teams.
Least privilege rewrite
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "SnapshotTaggedVolumes",
"Effect": "Allow",
"Action": "ec2:CreateSnapshot",
"Resource": "arn:aws:ec2:us-east-1:111122223333:volume/*",
"Condition": {
"StringEquals": {
"ec2:ResourceTag/Backup": "true"
}
}
},
{
"Sid": "SnapshotCreate",
"Effect": "Allow",
"Action": "ec2:CreateSnapshot",
"Resource": "arn:aws:ec2:us-east-1::snapshot/*"
},
{
"Sid": "TagOnCreate",
"Effect": "Allow",
"Action": "ec2:CreateTags",
"Resource": "arn:aws:ec2:us-east-1::snapshot/*",
"Condition": {
"StringEquals": {
"ec2:CreateAction": "CreateSnapshot"
}
}
}
]
}
The rewrite limits snapshots to tagged volumes in one Region, allows tagging only at creation, and removes DeleteSnapshot.
What it allows
Allow 1 action (ec2:CreateSnapshot) on arn:aws:ec2:us-east-1:111122223333:volume/* when ec2:ResourceTag/Backup StringEquals true.
Action or pattern Actions Access levels ec2:CreateSnapshot1 Write 1 Allow 1 action (ec2:CreateSnapshot) on arn:aws:ec2:us-east-1::snapshot/*.
Action or pattern Actions Access levels ec2:CreateSnapshot1 Write 1 Allow 1 action (ec2:CreateTags) on arn:aws:ec2:us-east-1::snapshot/* when ec2:CreateAction StringEquals CreateSnapshot.
Action or pattern Actions Access levels ec2:CreateTags1 Tagging 1
Checks
No flags from the six checks.
Related pages
Sources
- IAM User Guide: EC2 access in a specific Region, read 16 Nov 2026
- IAM User Guide: attribute-based access control tutorial, read 16 Nov 2026
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026
Last reviewed 16 Nov 2026.