Amazon offer
When I started writing my first book Deployment from Scratch I knew I'll be self-publishing (which is a story for another time) but I wasn't sure whether I should go with selling my book on Amazon marketplace or not.
Amazon was tempting for its brand and distribution. It's almost a default choice if you are skipping a publisher. But looking closer at the numbers, KDP made less and less sense. It might be a surprise for you to find out how much revenue Amazon is keeping to itself.
When authors sell their books through KDP, they earn royalties based on the list price of the book and the sales channels through which it is sold. Paperbacks royalties are 60% for books priced above $10 and only 50% for cheaper books (was 60% for all before). But printing books is expensive, no real surprise there.
The hard part are royalties for ebooks. There are 70% and 35% royalty structure you can choose from The first option you have is a structure with 70% royalties for books under $9.99, minus download costs that differ from market to market:
Amazon.com: US $0.15/MB Amazon.ca: CAD $0.15/MB Amazon.com.br: R$0.30/MB Amazon.co.uk: UK £0.10/MB Amazon.de: €0,12/MB Amazon.fr: €0,12/MB Amazon.es: €0,12/MB Amazon.in: INR ₹7/MB Amazon.it: €0,12/MB Amazon.nl: €0,12/MB Amazon.co.jp: ¥1/MB Amazon.com.mx: MXN $1/MB Amazon.com.au: AUD $0.15/MB
The 70% royalty is also not available everywhere and is reduced to 35% in some markets like India. And that's not where limitations end. The price must also be at least 20% lower than the lowest list price for a print version.
The second option is to go for 35% flat royalty for all digital downloads. This is the only option that allows you to go above $9.99 (hence why so many ebooks are sold at this price point). While this might work for books selling millions, this is a terrible idea for your niche market book.
My experience
At the time, Gumroad asked for flat 5% cut plus processing fees (today it's 10%), offered being the Merchant of Record in EU (today worldwide) and even had their own niche marketplace. On top of that you also got unlimited email marketing platform to connect with your readers. This seemed like a great option for someone like me so I built my own distribution in the end and went with Gumroad for my payment processing.
Looking back this was 100% right decision. But I always wondered, could Amazon KDP work for me? So a couple years later, I set up Amazon KDP and put my books there. This was an experiment in seeing if Amazon can help me distribute my books despite the big fees. Since my first book comes with code, I only tried it with my second book.

I continued to sell with Gumroad and haven't directed any traffic or attention to the Amazon store at all. While this is a terrible thing to do if you actually want to succeed on Amazon (you need sales and rating to kind of get things going) I couldn't really justify it. I was just curious if Amazon can work on its own.
I got probably like 10 sales in couple of months of this experiment. And I even know why. Amazon is about recommending something that sells and the only other option is offer something people consistently search for. But the search volume for the topic of my book is practically zero.
Future
I think I could try Amazon KDP once more in the future if I have something that I would believe can be an Amazon bestseller. And I would only bootstrap it with Amazon KDP Select which is bit more favourable option (but you give up exclusivity). But for the small niche books like mine? It's a pass. Better build your distribution.