flattening data returned from ec2 for php array of securtity groups