refactor ec2 response structure