Childhood dreams differ from person to person. For some, it is becoming an astronaut or a millionaire, for others it might be traveling around the world. For comedian Steve Mazan, it was always to be on The Late Show with David Letterman—but it wasn’t until he was told he may only have five years to live that he realized his dream needed to be put on a tight schedule.

In 2005, at age 34, Mazan was able to make a comfortable living solely on performing stand-up comedy in clubs around the country, which most comedians would tell you already made him a success. But after closing a show one night in Los Angeles, Mazan knew something wasn’t right. A few hours after dismissing abdominal pain as food poisoning, the pains grew more extreme and his girlfriend, Denise, took him to the emergency room.

Doctors prepared Mazan for surgery to remove his appendix. But when Mazan woke up the next day, he found out this was anything but a run-of-the-mill case of appendicitis. His liver was covered in tumors.

“There was a couple days of waiting on tests, and they found out the tumors were cancerous. The other thing the tests said was that they didn’t start in my liver, they came from someplace else,” Mazan said.

After two more months of tests, doctors concluded the tumors came from his intestines, so they rolled him into surgery once again, this time to remove nearly a foot of his intestine. That’s when doctors told him that there was no treatment or cure for the tumors on his liver.

Mazan, now 41, was not a candidate for a liver transplant, and there was no type of treatment that doctors believed would benefit him.

“For everything they’ve come across medicine-wise—chemo, radiation, anything they think might do some good, there is just as big of a chance that they might do some bad—it could even excite the tumors and make them grow instead of shrink,” he said.

Mazan’s tumors were slow-growing, and doctors told him and Denise that he could live for 10 to 15 years with the cancer.

“It was obvious they were giving us the positive side of it, and we both asked at the same time what the worst case was. And that’s when they told us, maybe five years,” he said. “So that was pretty devastating.”

Mazan said after going through the initial stages of grief, he decided to make some changes in his life.

“I thought if I only have five years, what do I want to make sure happens in those five years?”

In 2006, he and Denise got married, and he gave himself one year to fulfill his dream of getting on The Late Show with David Letterman.

“I was positive I was going to be on Letterman someday, but now I had to ask myself, ‘Do I have time to wait around for someday, or do I have to make it happen?” he said.

That was the beginning of Dying to Do Letterman. Along with some close friends, Mazan started a website and put up videos of his comedy routines. He asked viewers to send the show an e-mail if they thought he was funny enough to be on The Late Show.

Four months after starting up the project, Mazan received a letter from the show’s executive producer, saying he was very sorry to hear about his condition, but it was nearly impossible for him to perform on the show.

“I didn’t want people to think it was a ‘make-a-wish’ thing, where I wanted to be on Letterman because I had cancer. I wanted the Letterman show to hear about me and look at me. If they didn’t think I was good enough to be on then I didn’t want to be on,” he said.

For most this news would be devastating, but Mazan, who is an upbeat kind of guy, saw a silver lining—the show’s staff knew about him, and through his website had sent them enough e-mails to get noticed.

Meanwhile, the co-pays for Mazan’s scans every three months were piling up. He struggled with whether he should give up on comedy and put his energy into another job with higher pay and better benefits.

“Ultimately we decided, as dark as it sounds, if you only have five years left to live, is the way to spend it just trying to make enough money to pay back these bills?” he said.

In September 2009, almost five years later, Mazan got the phone call he had been waiting for: He was officially scheduled to be on the show just one week later—and the rest is history.

“It is hard for anything that you live over and over in your head to live up to what you’ve built it up to be. But I will say being on Letterman, that whole day, actually that whole week ended up being more than I ever imagined,” Mazan said.

It was Mazan’s wife who suggested that all the videos he took over the past few years be produced into a documentary. He was skeptical at first, thinking people (including himself) wouldn’t want to watch a documentary about cancer. But with the help of a few friends they came out with a film more about dreams and comedy, and less about and incurable disease.

“I think the movie comes out a lot closer to Rocky than to Philadelphia,” he said.

The documentary, appropriately named Dying to Do Letterman has had an overwhelming reaction, receiving major awards at four different film festivals—and it’s even received some Oscar buzz.

“Everyone asks me what my dream is now—and now that we see the reaction we’re having, and inspiring people, it is to try and get as many people to see this as possible,” he said.

These days, besides some minor abdominal pain and fatigue, Mazan said he feels great. Nearly seven years past his initial diagnosis, his scans show that his tumors are not much bigger than they were the day they were found. Doctors don’t know if or when the tumors will start to grow at a more rapid rate.

But Mazan said he feels confident that his tumors have stopped growing, and attributes it to fulfilling his dream of being on David Letterman’s show.

“I think chasing this dream has kept everything at bay,” he said.

Click here to watch a trailer for Dying to Do Letterman.

Click here to learn more about Steve Mazan.