[Updated Jun 26, 2017] Starting April 28, 2017, you can now specify your own name for the EC2 security group using CloudFormation using GroupName on the AWS::EC2::SecurityGroup resource.
Thanks surenyonjan for comment for this update.
[Original answer December 23, 2016] - No, it is currently not possible to provide a custom name for the EC2 security group using CloudFormation.
According to AWS::EC2::SecurityGroup resource documentation does not have an available Name or GroupName property. You can specify tags using the Tags property as an alternative, as you indicated.
Recently, some CloudFormation resources began supporting custom names using the Name property. For a complete list of supported resources, see the Type Name section in the documentation.
AWS::EC2::SecurityGroup not one of the resources that support user names. As to why, apparently, this is due to the fact that this CloudFormation resource is an earlier version created before user names were supported by the service.
It is possible that AWS will eventually return and update all existing CloudFormation resources with username support at some point if enough users ask them to do so. If this is an important feature for your use case, I recommend contacting their products / support groups with a feature request to help them make it a higher priority.
source share