(NASDAQ:AMZN) is set to report earnings after the market closes on Thursday. And with the stock near an all-time high, there is a lot riding on these results.

Here are three things the online retail giant needs to deliver if it wants to stay in Wall Street's good graces.

Trounced expectations
Amazon could start by beating sales and profit estimates. That won't be hard as far as earnings go. Analysts expect just $0.06 a share in profit this quarter after Amazon booked a tiny $7 million -- or $0.01 a share -- in the same quarter last year. Luckily for the retailer, investors haven't demanded earnings growth from the company. It has managed just $42 million in operating income in the last 12 months, a period over which the stock has added billions in market capitalization.

The bar is set much higher for sales growth, though. Amazon will need to boost revenue to at least $15.74 billion to meet expectations. That's about 23% higher than what it reported in the year-ago quarter. eBay, by comparison, managed just 12% sales growth in its online marketplace business over the second quarter.

Higher media sales
Notching a boost in digital content sales would help Amazon hit its higher target. CEO Jeff Bezos has made it clear that Amazon's tablet and e-reader strategy doesn't depend on profiting from the hardware, but instead aims to cash in on the sale of books and movies to those devices.

Investors haven't seen much evidence of that strategy working yet, though. Amazon's media sales growth slowed in the first quarter, to 7% from the 19% it reported a year before. With Barnes & Noble reporting a big drop in digital sales last month, and with Microsoft taking a hefty charge on its Surface RT tablets, Amazon will have to show how it can buck that trend and profit from its push into tablets and e-readers.

Lower costs
But the biggest hole in Amazon's business lately has been skyrocketing expenses. The company is boosting spending on everything from real estate to video content in an effort to compete in wildly different markets. And with the expansion of its same-day grocery business, Amazon risks spreading itself even thinner.

The company has made progress lowering its shipping costs, helping gross margin jump to 27% last quarter. That's proof that its investment in new warehouses and fulfillment centers was a smart one. Still, with operating expenses stuck near 100% of sales, Amazon needs to show similar progress in its other costly initiatives to justify the stock's premium valuation.