Your question deals with "earning money", which by this, I will assume you mean "how do they profit?" - I'll deal with Netflix here, since it's a lot harder to figure out Amazon based on the different games they play with their money.
Fundamentally, a business profits when its revenue exceeds its expenses. Most people understand this. However, what most people don't understand is how expenses are accounted for - the financial and managerial accounting methods that tell you whether or not you're truly profitable.
Profit can't simply factor net income.
Let's say I invest $100,000 into a business. The business, in turn, makes me a net profit of $2,500 per year. Am I profitable? The answer is "it depends," but probably not. First, I have opportunity cost. What if I had invested $100,000 into the S&P 500, which returns an average of 12% over time? Or, over the last few years, it has returned 30%. I would have been much more profitable had I done that.
Further, profit is not the same as cash flow. I may generate a $2,500 profit with my business, but I have to keep sticking $3,000 per year into it. I'm cash-flow negative. This business may be turning a profit on the books, but it's a money pit. That's usually an unsustainable model.
Thus, by the standards of many investors, these services don't make money and are not tremendously good investments. Financials from NFLX show operating margin (before interest/taxes) around 4-6% on $11B in revenue, and that margin percentage has not increased year to year (in fact, it's trending downward). This is kind of a red flag when it comes to deciding whether Netflix is a good investment.
How does Netflix Stack Up?
Most solid investments are going to see operating margin around 12-20%. The Walt Disney Company, by comparison, sees operating margin of 26% on $55B in revenue. Disney happens to be a media powerhouse, owning the ABC and ESPN networks, along with its Walt Disney Studios Motion Pictures business and its theme parks. All of its businesses see unit operating margins above 15%, but its ABC and ESPN business is the most profitable by margin at around 28% (most companies group their operations such that each unit is above 15%, or whatever is industry-standard).
Compared to Disney, Netflix doesn't seem to have very good performance, at least today. While we'd all like to look in a crystal ball and predict what will happen in the future, from the immediate past, we can see that Disney has been far more efficient at converting sales revenue to profit dollars. Netflix, on the other hand, has been around long enough that it can be considered "mature technology" - and a serious investor has a reasonable risk that it will not be able to meet its financial obligations going forward.