#14143 ec2.query: handling the case where requesturl is passed in

Handle the cases where requesturl is passed in and the ec2 endpoint needs to be parsed from it.  Resolves issue #14143
I would prefer to explore all other options before deciding to use a regexp. Have you taken a look at using the parsing functionality in urllib?