Wall Street declines with Amazon; S&P 500 on track for monthly gain