1

When attempting to attach a security group to one of my ec2 instances, I am experiencing a permission-related error:

ERROR - Failed to attach security group to EC2 instance due to the error
software.amazon.awssdk.services.ec2.model.Ec2Exception: You are not authorized to perform this operation. (Service: Ec2, Status Code: 403)

I want to maintain the principle of least privilege in my environment, but I cannot find any documentation from AWS around what the minimum permissions required for attaching SGs to EC2s.

Does anyone have any resources surrounding this matter or perhaps know the answer?

Bri
  • 386
  • 4
  • 12
  • 2
    I think it's `ModifyInstanceAttribute`. Usually the SDK tells you exactly which API call it tried to make, odd that it didn't here. – jordanm Sep 09 '21 at 19:26

0 Answers0