Amazon's cloud services unit AWS was struggling to recover from a widespread outage that knocked out thousands of websites.