This is a difficult question to answer, because there are many factors that are involved in publishing a book on Amazon.
If you decide to write a book yourself, then it doesn't cost anything but your time. You'd likely want to consider hiring an editor or proof-reader, as well as a graphics designer to design your book cover for you.
The cost to hire an editor or proof-reader will depend on the length of your book, but you could find many people to do this for you inexpensively on Fiverr.
A book cover can cost as low as $5-10 using websites like Fiverr.
If you decide to hire a ghostwriter, then it also depends on the length of your book, but also on the quality of the writer. Some writers are incredibly talented but can be expensive. Others are more reasonably priced, or even maybe very inexpensive.
As you can tell, it's impossible to answer - it really depends on you and your budget. You can get any book written for you within any budget you have, even for as low as $100. However, you must keep in mind that you typically get what you pay for. It's always important to make sure you publish a quality book that your customers would enjoy.
There can also be some marketing costs involved in promoting your book on Amazon. This will also depend on your budget. There are many free ways to market a book, and other ways which can cost money such as paid advertising.
Inside my Mastering Book Publishing course, I show you how to hire a ghostwriter to write a quality book for you, which you can publish on Amazon and start making money from.