creates security groups if they don't already exist

This creates security groups on ec2 if they don't already exist.
I think you should get rid of the memoization here.  Based on how the code is structured, there is never a point in which the `@security_groups` will actually be read from memory.