The answer given by Scott Moore and selected as the correct answer at the time of writing does not solve the issue anymore. Not Scott's fault, AWS is frequently changing many things.
We had followed an AWS document and created a custom policy which had been working just fine since the last 1.5 years or so and suddenly today morning our clients started facing issues in editing the Security Groups and so I stumbled upon this thread in order to try possible solutions.
I eventually ended up creating a custom policy from scratch as it seems something critical has been just deprecated from AWS IAM policy side today morning; so the policy that works at the time of writing for me is :-
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DescribeSecurityGroups", "ec2:DescribeSecurityGroupRules", "ec2:ModifySecurityGroupRules" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "ec2:RevokeSecurityGroupEgress", "ec2:RevokeSecurityGroupIngress", "ec2:AuthorizeSecurityGroupEgress", "ec2:AuthorizeSecurityGroupIngress", "ec2:UpdateSecurityGroupRuleDescriptionsEgress", "ec2:UpdateSecurityGroupRuleDescriptionsIngress" ], "Resource": "arn:aws:ec2:*:*:security-group/*" } ] }
This :-
- Allows to edit/delete existing rules inside the existing Security Groups.
- Allows to create new rules inside the existing Security Groups.
- Does not allow to create a new security-group or delete an existing security-group.
The question never focused on allowing to create new security groups or delete existing security groups and so that has not been added in the policy but can be added by the reader if their requirement demands for it.