Fix bug with getting ec2 connection instead of source image

Bug fix. Was getting the ec2 connection instead of the image from the state data.