Amazon reported first-quarter sales and profit that exceeded analysts' estimates.