Amazon is opening a massive new office in the Big Apple next year.

The Seattle-based web giant has signed a lease for 359,000 square feet at Brookfield’s 5 Manhattan West, where it intends to open in 2018.

It will receive up to $20 million from the state in Excelsior Jobs Program tax credits and expects to hire 2,000 people. The company said it will be the primary city location for its advertising division, with jobs in finance, sales, marketing and information technology and pay that will average $100,000.

Amazon will also invest $55 million — equating to $153 per foot — to outfit the former industrial building’s entire 6th and 7th floors and portions of the 8th and 10th floors. It is already starting to recruit for those positions that would start work next year.

The lease was first reported in the works by the Commercial Observer last spring. The tenant was represented by Derek Trulson, Josh Stuart, Bill Peters and Clay Nielsen of JLL.

Brookfield was represented by a Cushman & Wakefield team of Bruce Mosler, Josh Kuriloff, Rob Lowe, Ethan Silverstein and Matthias Li, and in-house by Jeremiah Larkin, Duncan McCuaig and Alex Liscio.

The 1.8 million-square-foot building was previously known as 450 W. 33rd St. and runs through to West 31st Street at Tenth Avenue. A $300 million renovation peeled off its 16-story sloping façade, which was replaced with dramatic angled floor-to-ceiling glass. Its base houses a Whole Foods in part of its retail space.

The deal comes on the heels of Amazon’s lease for an 855,000-square-foot Fulfillment Center on Staten Island that will have 2,250 employees working with advanced robotics.

Amazon already has 1,800 employees in various city locations. It occupies and has the right to buy Vornado’s 7 W. 34th St. with 470,000 square feet, where it has a Prime Now local distribution facility. Its Fashion Photo studio is in Brooklyn while an Amazon Books is located in Columbus Circle.

The gorilla tenant is also getting cities and states across the US in a feeding frenzy to offer the shopping giant the best sites and incentives for a new $5 billion, 8 million-square-foot second headquarters that eventually could employ 50,000 people. Local politicians and building owners are solidifying behind Brooklyn, while some upstaters are focused on Rochester.