How to change an EC2 instance's security group

Solution 1:

Unless the instance is in a VPC, security groups can only be chosen before you start your instance for the first time.

Only VPC instances can change security group. For information on VPC see here.

Solution 2:

Now you can change the security group of an EC2 instance from the web console itself.

Select an instance -> right click or click Actions -> Under Networking -> select Change Security Groups

enter image description here


Solution 3:

For instances launched without a VPC, the Security Group can only be specified at first launch, and cannot be changed afterwards, not even if the instance is stopped first.

For instances launched into a VPC, the group can be changed. However, not all instance types are supported in the VPC - for example, "micro" is not supported as of December 2011.

Tags:

Amazon Ec2