Amazon is teaming up with HBO, the first such streaming arrangement agreed to by the cable network, in a deal that will make available to Amazon Prime members some classic TV like “The Sopranos” and “The Wire.”

The online retailer has faced mounting pressure to boost its bottom line after a spate of furious growth. As more Americans shop online, Amazon has spent heavily to expand its business into new areas — from movie streaming to e-readers and groceries — often at the expense of profit.