A dying teen suffering from an untreatable form of cancer has written a song to say goodbye.

In 2009, Zach Sobiech was diagnosed with osteosarcoma, a rare bone cancer that affects only 800 people a year in the U.S.

Since his diagnoses, he has undergone 10 surgical operations on his hip and lungs and endured months of chemotherapy.

However, after doctors told him this May that he had run out of treatment options because his cancer spread to his pelvis and lungs and that he had only months to live, the 17-year-old from Lakeland, Minnesota, wrote a song titled "Clouds" as a goodbye letter to his family and friends, KSL TV reported.

Zach has posted his song on YouTube, where it has now been viewed close to 400,000 times since being uploaded on December 5.

"And we'll go up, up, up, but I'll fly a little higher. We'll go up in the clouds because the view is a little nicer," Zach sings in the song. "Up here, my dear. It won't be long now; it won't be long now."

According to the song description on YouTube, all proceeds from "Clouds" will go to the Zach Sobiech Osteosarcoma Fund, a charity started by Zach's parents to help raise money for cancer research in hopes of helping children diagnosed with Zach's condition in the future to have a better chance at finding a cure.

"His response is to embrace every day with hope and joy," according to Sobiech's profile description on CaringBridge. "Some days are harder than others, but he remains the upbeat and positive soul he has always been."