Using while for waitting create snapshot to register AMI.