As Amazon dances through courtship rituals with the 20 cities hoping to host its second headquarters, the company is charging ahead on a slate of other real estate projects.

This week, the e-commerce giant announced a significant expansion of its offices in Boston and Vancouver, British Columbia, planning for a total of 5,000 new tech jobs. Earlier in April, it said it would open its fourth fulfillment center in Nevada, bringing more than 1,000 jobs to North Las Vegas. In March, it revealed plans to build its first such facility in Missouri.

On Tuesday, Amazon announced it would move into a 430,000-square-foot “Tech Hub” in 2021, and said the new jobs would be created in fields including machine learning, speech science, cloud computing, and robotics.

In January, Amazon placed Boston among 20 finalists to host the company’s second North American headquarters, and Tuesday’s announcement does not preclude the city from contention for the $5 billion project that the e-commerce giant has said would create some 50,000 jobs over the next decade, according to The Associated Press. [The Research Triangle region of North Carolina also is one of the 2o finalists.]

More HQ2 coverage:

The city’s preferred site for the larger project is Suffolk Downs, a former horse racing venue in the East Boston neighborhood, near Logan International Airport. But other sites are being considered as well, including one in the neighboring city of Somerville.

The company currently has about 1,200 workers in the city, according to Rohit Prasad, a Boston-based vice president and head scientist of Amazon Alexa. In 2016, the company opened a fulfillment center in Fall River, Massachusetts, that employs more than one thousand workers.

Amazon pledges job training

The Seaport district fell largely into decay and disuse in the middle part of the 20th century before being transforming in recent decades into a center for cutting-edge technology firms.

Republican Gov. Charlie Baker and Democratic Boston Mayor Marty Walsh both celebrated Amazon’s decision, with Walsh labeling it a strong vote of confidence for the city.

“It’s great news for Boston that Amazon is expanding its footprint in the Seaport, bringing new jobs and economic opportunities to our city,” Walsh said in a statement.

Critics have said Boston residents and particularly those who live in predominantly minority neighborhoods have been largely shut out of the Seaport boom. Amazon said in its statement that construction of the new office space would generate funding for job training programs that prepare local residents for technology jobs.

“They’ve been on a pretty blistering pace, getting a lot of space everywhere,” said Greg Melich, an analyst with MoffettNathanson.

Building research and development centers to support new technology, while also enlarging its vast network of distribution centers, has increased Amazon’s capital expenditures so that they now roughly equal Walmart’s, Melich said.

Alexa focus

In Boston, it is bringing 2,000 jobs in machine learning, speech science, cloud computing and robotics engineering.

The emphasis on speech science is a sign that Amazon is betting that its Alexa digital assistant is at the vanguard of voice-based commerce, a form of shopping that Melich said was poised to grow at a rapid clip the way mobile buying did several years ago.

Boston is one of the finalists in the heated competition to lure Amazon’s new headquarters, known as HQ2. The project promises as many as 50,000 new jobs and more than $5 billion in investment — but has also raised concerns about rising property prices and intensifying urban congestion.

“Everyone wants the cake, which is the headquarters, but if not, they’ll take the icing,” said Dennis Frenchman, a professor of urban design and planning at the Massachusetts Institute of Technology.

Boston officials approved $5 million in property tax incentives over 15 years for Amazon to occupy its Seaport offices and have dangled another $5 million in breaks if the company agrees to more local expansion and job creation.