fix(infra): scope DLM snapshot sharing to snapshot ARNs

ModifySnapshotAttribute on every resource can share a snapshot. The boundary allows it only on snapshot ARNs.
This commit is contained in:
Adam Moussa 2026-10-01 13:48:21 -04:00
parent 1a3c3d72a2
commit 91cf0bd2ff
No known key found for this signature in database

View file

@ -190,12 +190,18 @@ data "aws_iam_policy_document" "dlm_boundary" {
"ec2:DescribeVolumes", "ec2:DescribeVolumes",
"ec2:DisableFastSnapshotRestores", "ec2:DisableFastSnapshotRestores",
"ec2:EnableFastSnapshotRestores", "ec2:EnableFastSnapshotRestores",
"ec2:ModifySnapshotAttribute",
"ec2:ModifySnapshotTier", "ec2:ModifySnapshotTier",
] ]
resources = ["*"] resources = ["*"]
} }
statement {
sid = "SnapshotSharing"
effect = "Allow"
actions = ["ec2:ModifySnapshotAttribute"]
resources = ["arn:aws:ec2:*:*:snapshot/*"]
}
statement { statement {
sid = "SnapshotRules" sid = "SnapshotRules"
effect = "Allow" effect = "Allow"