[aws] catch invalid uri

if URI.parse does not result in a host we don't continue and raise
an error.
this fixes the failing build