Washington University in St Louis PhD in CS, or Accept Job Offer from Amazon

I agree with most of the comments above. You should ONLY go for the Ph.D. if you are interested in doing research and possibly working in academia or at a government laboratory. If you are doing the Ph.D. just to get a better salary, don’t! The Ph.D. does not qualify you for a lot more and if you are starting at $140k with a B.S. you will be significantly higher than that in the 3-5 years it takes to get a Ph.D. Those earnings will never be recovered.

I would even say that the M.S. will be superfluous once you have work experience, however, you can make that choice later on and with a much better perspective on what it could mean for your career.

One final thing is that if you find that working in industry is not all that you want in life, you will be free to return for a Ph.D. later and with that industry experience you will be a valuable prospect. At that point, you will have balanced the loss in salary with the desire to do the Ph.D. and your decision will be a lot easier. Easier still if you are able to save a lot of our salary and have the freedom to choose what you want to do with the rest of your life.

Good Luck!