Fix for problems in the way that REST instances are configured.

More fixes from testing on AWS.