Amazon wrote the playbook for innovation in the 21st century and uses it to spin out a stream of disruptive ideas - web services, free delivery, drones. Now, with its recent announcement to acquire Whole Foods, Amazon is preparing to turn its innovation engine on the grocery store industry.

But amid all this innovative success, it's important to remember another thing Amazon is good at doing: killing projects that aren't performing as well as expected.

When its much-hyped Fire Phone launched with a thud, what did CEO Jeff Bezos do? Kill it. Ditto for the Amazon Wallet mobile payments service; Amazon's fashion site, Endless; the Amazon Destinations travel site; and so many other products you've either long forgot existed or didn't even know about.

Knowing when to abandon a project requires just as much skill as knowing when to push it. Innovation is a razor's edge - on one side are companies so stuck in their ways that they don't innovate at all, while on the other side are the companies that innovate too much and flame out. The trick is in finding the middle ground between these opposing sides to drive healthy growth.

So how do you know you're hitting that sweet spot?

1/ You're both dogged and flexible

The biggest myth about successful innovators is that they figure out the right questions to solve and tinker away until they come up with the perfect solution. But often the most successful innovators are the ones who realize, as they dig into a problem, that the real opportunity isn't the one they initially thought. Being committed to innovation is important, but you can't become blinded to other opportunities.

Last year, HP considered how to tackle the market for printing all those photos being captured on our phones. The company initially approached the challenge through the lens of its traditional printers, innovating around apps people could use to print at home. Unfortunately, as the company quickly realized, that didn't get at what users really wanted - printing and sharing spontaneously, and on the go. So HP pivoted to create Sprocket, a handheld portable printer that provides spur-of-the-moment printing, and has become wildly popular.

2/ You can walk away

It's possible to be too committed. As much as leaders need to push the envelope, they also need to know when to course-correct. Successful leaders are the ones who don't hesitate to shift gears when something isn't working.

Consider how Target recently pulled the plug on a project called Store of the Future. The initiative was reportedly a prototype store that combined a browsing showroom with an adjoining warehouse that delivered purchased items to customers on their way out of the store.

But during the development process Target realized that the money, effort, and innovation required to make it happen wasn't where it needed to be. Instead, the company decided to focus its innovation on its core offerings. That meant an overhaul of its existing store and online experience, including a redesign that features separate entrances and experiences for customers who are in hurry, versus those who want to browse.

3/ The market judges your change of course, but your employees don't

At times, a decision to shift innovation can look scattershot to people outside your company, especially in today's environment where many companies are scrutinized so closely. Good leaders don't pay much attention to this. Instead they trust their choices and stay on course.

Just as important, those leaders' employees are clear about the objectives that have been set for them. They've learned that experimentation is part of innovation. So when they are directed to turn their attention to another project, the employees are confident enough to pivot to the next set of ideas without regretting what's being left behind.

Recently, I was talking to a co-worker about the age-old question: Coke or Pepsi? Although I am a Pepsi person, I hold great respect for the Coca-Cola Company and its approach to innovation. For example, remember 1985? The Coca-Cola Company announced that it would be changing the formula of its flagship product, Coca-Cola in an attempt to make it more competitive and regain the market share it had lost to its sweeter-tasting rival Pepsi. When New Coke hit the market, the backlash from the public was overwhelming and the company was forced to bring back the old formula just 79 days later. Coca-Cola survived and has since delivered numerous successful innovative products to the market.

What struck me most about how Coca-Cola handled this was actually a comment made by PepsiCo's former CEO. When asked why he thought no one who worked on New Coke had been fired or demoted, Roger Enrico argued that doing so would have sent a message to all employees that risk-taking was strongly discouraged at Coca-Cola.
Coca-Cola's experience is a perfect reminder of how a company can survive a very public innovation failure and show its employees that it's okay fail.

So remember, if your new idea doesn't turn out to be the success you thought it would be, pull an Amazon or a Coke and acknowledge that you didn't get it quite right. Then get your team to start working on what's next. Who knows, your company might just deliver the next disruptive solution in the market.