Change Security Groups on EC2

It is difficult to change the secuirty group which an EC2 instance is assigned once its running

However one way to accomplish this is

1. Right click on instance and select "Create Image (EBS AMI). For example if the instance is called staging-srv.

2. Give the image a name and description and then create

3. Create your new security group and define required security measures e.g. inbound ports

4. Create a new EC2 instance based on the above created image.

5. If a elastic IP is assigned to staging-srv then disassoicate it

5. Launch the new instance

6. Associate the elastic IP with the new instance

6. Rename the old instance to e.g. staging-srv to staging-srv-old

7. Name the new instance staging-srv

8. Test your new instance with the new security group

9. Once happy it works delete the old ECS instance.

Comments

Popular posts from this blog

Basic Send Message to MQ with Java and IBM MQ JMS

Basic Receive Message to MQ with Java and IBM MQ JMS

Creating a simple Alert / Success Message with ASP.NET/VB using Bootstrap