Updated S3 client to throw an exception when 301 responses cannot be redirected