Nasdaq, S&P 500 crawl higher on Amazon, Apple boost