Update Security Group tags using boto3

Solution 1:

for reservation in sgs['SecurityGroups']:
        ids.append(reservation['GroupName'])

This should be changed to

for reservation in sgs['SecurityGroups']:
        ids.append(reservation['GroupIds'])

This is because the create_tags function expects Security Group IDs (IDs for the security groups are in the format sg-xxxxxxxx) and not Security Group names.