moved hosts file manipulation to ec2 state