updating an AWS security group?

I have a need to add a rule to a security group. The security group was not created using Ansible.

The rule format returned by ec2_group_facts is very different to the rule format used by ec2_group. This means I cannot do the obvious thing of reading in the current rules, appending my own, and then writing them all back to the original group. At least not without a very complicated rewrite of the data structure coming from ec2_group_facts.

Does anyone have better idea (or has anyone already done the conversion)?

Someone called Simon Tyler had the same question only a month or so ago (search for "How to export from ec2_group_facts and import into ec2_group"), but I saw no responses.

Regards, K.