I have an Amazon EC2 instance running and I will like to add another security group to that instance and then remove the current security group from that instance. Is this possible?

link|improve this question

40% accept rate
Just to add a few more bits of information. We have two instances joint to two security groups. We want to separate this and dedicate a security group per instance. – Geo Jul 7 '09 at 15:25
feedback

3 Answers

up vote 12 down vote accepted

Amazon's FAQ says it's not possible to define a security group anywhere but at launch time.

link|improve this answer
Thanks, I miss that question when I was browsing the FAQ. Thanks again. – Geo Jul 7 '09 at 15:46
feedback
  1. Create an AMI image from the instance you want to move to a different security group.
  2. Launch a new instance using that image, now we can assign this new instance to a different security group.
  3. Discard the previous instance.

This requires downtime on your instance. There may be some other options available using the API.

link|improve this answer
feedback

However according the this FAQ "modify the settings for the current security group - which will affect all instances running in the specific group" you can change gradually redefine the existing ones. As I'm trying this now for my scenario through the EC2 console, my records where all erased!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.