Gwynne Shotwell has seen her share of success as the president and chief operating officer of SpaceX, the private aerospace company founded in 2002 by billionaire Elon Musk.

Under the leadership of Musk and Shotwell, the latter of whom joined SpaceX 16 years ago as one of its first employees, SpaceX has grown to become one of the world's most valuable private companies, valued at $27.5 billion as of April. But, despite the success Shotwell has experienced at SpaceX, she says it's actually been the times she's failed that have taught her the most.

"You don't learn anything from success, but you learn a lot from your failures," Shotwell says in an interview with the storytelling platform Makers that was posted online Friday.

Specifically, Shotwell recalls the initial series of rocket launches that SpaceX attempted with its first rocket, the single-engine Falcon 1. The Falcon 1 eventually became the first privately developed liquid-fuel rocket to orbit the Earth after its first successful launch in September 2008, but SpaceX initially had to struggle through three failed launch attempts over 2½ years before it could celebrate that accomplishment.

SpaceX first attempted to launch a Falcon 1 into orbit in March 2006. "We struggled with getting that vehicle to orbit on that first launch," Shotwell tells Makers. "That failure was pretty dramatic for us. We grew up overnight."

The company "analyzed what went wrong," Shotwell says, (the rocket had a fuel leak that caused a fire) and SpaceX tried to fix the issue and attempt another launch roughly a year later. "We went back to launch a year later, but we still had an issue. And then it took almost another year," Shotwell says in the interview about the second failed attempt in 2007.