added aws retry on http 503
added better error message for variable array index error
removed a print statement