Value of property SecurityGroupIds must be of type List of String error while updating stack

Question:

I am getting ROLLBACK_COMPLETE while try to updating a stack using the following code. Under events, I am not getting an error as “Value of property SecurityGroupIds must be of type List of String”.please help me to find a solution.

Mycode for first stack:

On update, I added the following. During this time I am getting the error I mentioned earlier

Answer:

When you specify an AWS::EC2::SecurityGroup type as an argument to the
Ref function, AWS CloudFormation returns the security group name or
the security group ID (for EC2-VPC security groups that are not in a
default VPC).

Your template is referencing the security group name where you should be referencing the group ID.

Leave a Reply