During my first few minutes visiting Toronto last month, I walked along the waterfront, where a scene unfolded that was so picturesque I wondered if I'd stepped onto the set of a cheery Toronto tourism video.

Laughing children ran around and played baseball at Ireland Park. People jogged or rode bicycles along bike trails by red-and-white-striped streetcars humming along Queens Quay West. Orderly lines of docked yachts and sailboats bobbed in Lake Ontario's blue water. It was 72 degrees, lightly breezy and sunny.

Toronto had quickly put a spell on me, and I considered whether the city could do the same to Amazon and CEO Jeff Bezos, too.

Canada's business capital and largest metropolis is among the 20 finalists for Amazon's second headquarters, dubbed HQ2. It's a massive corporate project the company said will generate $5 billion in investment and 50,000 new hires, a bounty so attractive that it's created a sweepstakes feel with cities bending over backward to win over Amazon. The company, which employs 45,000 people in its current Seattle headquarters, plans to make its pick later this year.

Now playing: Watch this: Toronto makes its pitch for Amazon HQ2 and tech greatness

As the sole city outside the US to make the shortlist, Toronto is often viewed as a dark horse candidate for the development. But city leaders touted its heavy tech talent and quality of life as major reasons why Amazon might go there. Plus, after President Donald Trump repeatedly attacked Amazon's tax contributions and alleged exploitation of the US Post Office earlier this year, the city's bid may be getting a boost since it's beyond Trump's reach.

Many in the city of 2.7 million see getting HQ2 as bringing Toronto the attention it's sought and cementing its position as a thriving, global tech hub. But as in every other finalist city, local officials will need to balance their enthusiasm against the many pitfalls Toronto could face from such a huge project being built by such a fast-growing company. Those may include higher rents, more traffic, a flight of local talent to the e-commerce titan and tax skirmishes with Amazon.

"They're getting some good publicity for this. Regardless of whether they locate or not, people are seeing the benefits of locating in Toronto," said Roelof van Dijk, a Toronto-based economist for real estate data provider CoStar Group.

Also, building outside the US could come with political pitfalls for Amazon. Such a decision from Bezos, a frequent Trump critic, could easily be seen as a thumping comeback against the president. But the move could reignite Trump's ire and incite a backlash from American shoppers. The White House didn't respond to a request for comment.

James Martin/CNET

On the cusp of tech greatness

Mayor John Tory's office in City Hall includes all the predictable trappings. There's a set of framed photos, including one of him suited up in Toronto Maple Leafs gear on the ice, bookshelves filled with keepsakes and gifts, and a colorful canvas with kids' handprints that says "Thank You Mayor Tory."

A former lawyer and CEO of the cable company Rogers, Tory told me the tech scene in Toronto just seven years ago was a very different place. The region has been good at churning out college grads in artificial intelligence and software engineering, but -- without enough local tech companies -- would promptly ship that talent off to California. Local startups, too, wouldn't scale up and instead sold off or moved away.

Over the next five to 10 years, I think the benefits will be enormous. Michael Katchen, Wealthsimple

"We were the greatest kind of farm team for Silicon Valley," said Tory, who smoothly rattled off talking points about his city in a deep baritone voice and calm, measured tone.

Today, more of that talent pool is sticking around, helping create a critical mass of tech activity in the city, including a constellation of local startups like Ecobee and Wattpad, and new offices from US tech companies like Salesforce and Etsy. One of the biggest tech projects coming to Toronto is a 12-acre plot along the waterfront that Sidewalk Labs, part of Google's parent company, Alphabet, plans to remake into a connected neighborhood and living lab for future urban development.

It's against that backdrop that many in Toronto feel they've already won recognition for the city's transformation by reaching the top 20 list for HQ2, out of 238 total bidders. Getting the project would be the ultimate validation of its tech status.

Ben Fox Rubin/CNET

"Maybe there's a little bit of a Canadian swagger we need to have as Canadians," Mark Cohon, chairman of Toronto Global, a not-for-profit that helps attract new business to the region, later told me. "I would have been disappointed if we didn't make the shortlist when you stack up on paper the great cities in North America."

Beyond its growing tech scene, Toronto boosters pointed to the city's low crime rate, cultural diversity and high college attainment. Canada's more welcoming immigration policy could gain Toronto more favor with Amazon, particularly after an uproar over the Trump administration's short-lived decision to separate families entering the US illegally.

"On net, Toronto has more going for it than negatives, and that's why they made it to the second round," said Brendan LaCerda, Moody's Analytics' Canada economist.

Amazon brings prosperity, and a lot more

While many cities see HQ2 as a major prize, a review of Seattle's growing pains from Amazon's so-called "prosperity bomb" may give some locals pause.

Seattle last month passed a new tax on local corporations making over $20 million annually, charging them $275 per employee to support an initiative to reduce homelessness. Local businesses fought the tax. Amazon paused some construction plans in the city, a move some saw as a hardball tactic to pressure Seattle's leaders. The City Council less than a month later opted to repeal the tax.

Tory's office declined to comment on the Seattle tax dustup, saying, "We have a very different tax system in Canada."

Other typical worries about HQ2 include higher housing costs and more traffic. Toronto already struggles with both of those problems, and HQ2 may only exacerbate them.

"Can they get any higher in the city?" one woman standing along King Street West exasperatedly asked about Toronto housing costs while talking to me about HQ2.

"Traffic in Toronto is horrendous. It rivals Los Angeles," LaCerda said.

Ben Fox Rubin/CNET

The local tech scene is mixed about HQ2, said Michael Katchen, CEO of the Toronto-based financial tech firm Wealthsimple. Some worry Amazon will gobble up local talent. Others, in the interest of "Canadian pride," would rather build up Toronto without the help of a US tech giant, he said.

"It'll hurt in the short term for sure," he said. "I imagine they'll come after our people, and we're gonna have to work hard to protect them. But over the next five to 10 years, I think the benefits will be enormous."

Amazon declined to comment for this story, but has said that it's contributed tens of millions of dollars for affordable housing in Seattle and that a majority of its Seattle workforce use public transportation or walk or bike to work. It's also touted the halo effect of its Seattle headquarters, including 53,000 indirect jobs, 2,000 small businesses opening around its offices and low city unemployment.

It's those types of benefits that have cities across the US salivating for their chance to land HQ2.

On the issue of Trump publicly attacking Amazon, Moody's Analytics senior economist Adam Ozimek doubted that would be a factor in Amazon's decision-making.

"I think that a guy like Jeff Bezos and a company like Amazon have extremely long horizon planning," he said. "I think that he's probably looking through this short-term noise."

A capital sensibility

Mayor Tory told me that a team from Amazon visited Toronto for a few days in March and asked questions about quality of life, arts and culture, and the local talent pool. They didn't give him a timeline for their decision.

While Toronto makes its best pitch, many HQ2 watchers are predicting Amazon will select the Washington, DC, area instead, where the company picked three separate potential sites. Plus, Bezos has been working to grow his influence in the US capital by buying The Washington Post and expanding Amazon's lobbying work there.

Maybe there's a little bit of a Canadian swagger we need to have. Mark Cohon, Toronto Global

Among the three DC-area sites, Montgomery County, Maryland, is offering the biggest publicly known tax incentives package for HQ2, at a staggering $8.5 billion. Toronto is offering no direct tax incentives, though Amazon would save money thanks to government-run health care and a cheaper workforce, due to a stronger US dollar.

I asked Tory whether he was concerned Toronto's bid wasn't competitive enough, given Maryland's lavish incentives.

He shook his head and smiled broadly, saying: "I'm very confident. My guess is in 2018, it's about a lot more than money."

Follow the Money: This is how digital cash is changing the way we save, shop and work.

CNET Magazine: Check out a sample of the stories in CNET's newsstand edition.