Set AMI IP after setup

This moves the assignment of the elastic ip to the end of the setup. This should hopefully prevent the issue where an ami becomes unresponsive part-way through the setup, possibly due to the new ip kicking in.