How to change the name and description of an AWS EC2 security group

amazon ec2amazon-web-services

How do you change the name and description of a security group in AWS EC2?

My security group is named quick-start-1 (the default) and I want to change it to "HTTP, HTTPS and Limited SSH".

Best Answer

It's not possible to rename a security group, by GUI or by API.

For VPC EC2 instances

You can dynamically assign security groups assigned to VPC EC2 instances. Create a new SG with the desired name and the same rules.

EC2 classic instances

It's not possible to change the security group that is assigned to EC2 classic instances.

If you must change the security group for an EC2 classic instance, then you need to:

  1. Create an AMI from your instance, then
  2. Launch a new copy of your instance from the AMI created in step #1, selecting the new security group at launch time.