I have an ebook published on Amazon and that was free. How can I advertise it without spending money?
One Missed Opportunity
You could even put a link to your book on your StackExchange profile. It is very free and I just checked yours for the book. Unfortunately it was not there.
Create a Blog
Create a blog, start writing free articles and give them away and then give away the book there too.
Create Web Site With Short Link
Create a web site like readmybook.com or something very memorable (register it at http://www.1and1.com/ for $0.99. Make your amazon link available on there and then create sticky notes that you hand out to people with your easy link on it.
Print Your Book, Give It To People Who Pass By
You could even print hardcopies of your book and hand them to people as they pass by at your work, on the street, at your school, etc.
The most effective advertising method is word of mouth. You wrote a book, hopefully you know who the target audience is. You basically need to find the people who are the "leaders" of their social groups and tend to spread trends. Marketing companies hunt for these people and they do exist. If you've written a good book and that person likes it, then they'll do the work for you of getting their network to read it.
However, and this must be said, it is unlikely that any of this will actually be free. Your time has value. You are spending your resources in order to do the job yourself no matter what. Which is not to say that you have spare resources in the field of fungible funds at this particular moment; but if you expect to advertise for free effectively, you're probably bound for disappointment. Some of the richest companies on the planet are advertising companies because making others aware of the available, desirable products is the gateway all businesses must cross to sell any product. It is where the money is at.
Which is to say that in our society many of the channels which may be suggested for you to advertise on have already been monetized. That is, to be effective, you must put money in. Don't believe me? Start a business account on facebook for your book (that much is free at least) and then make a post. They will offer to expose people in your region/demographic to your posts for a specific amount of money (likely in the $10-$15 range). In order for that offer to be effective and money making long term, "free" exposure on the platform has to be less effective. And since Facebook writes the algorithm, you can be sure that posts will be "Ranked low" (feel free to read strangled) if they trip up on the algorithm or compete with paid content.
There are plenty of ways to spend your time to make others aware of your work. There are zero "free" ways to do anything. I suggest you revise your thinking to "cost-effective" if you are at all planning to move enough product (your book) to be able to have a decent return on your labor. Once you've conceptualized advertising as work, which it is, you can figure out how its going to fit into your life like any of the other things you have to do with your time, including writing the next book.