Update: See additional Amazon earnings coverage here:

Shares of Amazon fell more than 8 percent in after-hours trading after the company missed profit expectations for the second straight quarter. The Seattle tech giant is spending heavily on increasing delivery capacity as it shifts from two- to one-day shipping as a core Amazon Prime benefit.

“We are ramping up to make our 25th holiday season the best ever for Prime customers — with millions of products available for free one-day delivery,” Amazon CEO Jeff Bezos said in a statement. “Customers love the transition of Prime from two days to one day — they’ve already ordered billions of items with free one-day delivery this year. It’s a big investment, and it’s the right long-term decision for customers. And although it’s counterintuitive, the fastest delivery speeds generate the least carbon emissions because these products ship from fulfillment centers very close to the customer — it simply becomes impractical to use air or long ground routes. Huge thanks to all the teams helping deliver for customers this holiday.”

On a call with reporters, Amazon CFO Brian Olsavsky said that he expects costs from the 1-day initiative to reach around $1.5 billion in the fourth quarter — that’s nearly double the $800 million spent in Q2.

Charlie O’Shea, an Amazon analyst with Moody’s, said that “we continue with our view that Amazon’s robust liquidity, with over $42 billion in cash and short-term investments, as well as AWS’ steady $2.3+ billion in operating income per quarter, provides the company with significant runway to continue with its myriad, necessary investments.”

Revenue: Amazon posted $70 billion in revenue, up 24 percent from the year-ago quarter. Analysts expected $68.8 billion. This quarter included Prime Day, Amazon’s big shopping extravaganza.

Profit: Amazon reported earnings per share of $4.23, missing expectations of $4.62, and down from $5.75 last year. Operating income of $3.2 billion was just above the company’s projections.

Stock: Amazon stock reached record highs in July but has dipped in the past three months. Shares are still up 15 percent this year, trading at around $1,781 on Thursday before the market closed.

Outlook: Amazon expects Q3 sales between $80 billion and $86.5 billion, up 11 to 20 percent year-over-year. Operating income is projected at $1.2 billion to $2.9 billion, down from $3.8 billion in Q4 2018.

Amazon Web Services: Amazon’s cloud business was up 27 percent at $9 billion, with $2.3 billion in operating income, continuing to help drive Amazon’s profits, though overall growth is slowing. Both AWS revenue and profit missed expectations.

Advertising: The company’s growing advertising arm doesn’t have its own category and is listed under a category called “Other.” That category brought in $3.6 billion in revenue in the quarter, up 44 percent over a year ago.

Physical stores: Amazon posted a loss of 1 percent to $4.2 billion. The category includes Whole Foods and Amazon Go stores.

Headcount: Amazon now employs a whopping 750,000 people, up 22 percent year-over-year.

Prime: Subscription services revenue, which includes Prime memberships, came in at $5 billion, up 34 percent. Amazon said it had more than 100 million Prime members in April 2018; it has not provided an updated number since then. A report in July from Consumer Intelligence Research Partners said Amazon had 95 million U.S. Prime members, with year-over-year membership growth slowing.

Shipping costs: Amazon’s shipping costs have ballooned in recent years as the company aims to speed up delivery. During Q3, Amazon spent $9.6 billion on shipping, up 46 percent. In 2018, Amazon spent $27.7 billion on shipping, an increase of $6 billion or roughly 27.6 percent over the prior year, according to GeekWire research. The company announced the one-day shipping initiative in April.