fix port bug when aws return temporary redirect

Test Plan: manual

Reviewers: merkkila, justin

CC: stephan, justin, peter, tberman

Differential Revision: http://phabricator.thefactory.com/D1525