ok, took it out of the generic host, and moved it to a helper function for _ec2.html.erb. seems to be working fine.