One of my best investments over the past two years was Amazon (AMZN -2.85%). I built up my position throughout 2016 and paid an average price of about $600. The stock's rally to over $1,500 earlier this year made it the largest position in my portfolio.

Yet Amazon started tumbling in early March due to the market instability caused by President Trump's introduction of new tariffs. That decline was exacerbated by Trump's incessant attacks on Amazon. Trump claimed that Amazon avoided taxes, caused the Postal Service to lose money, and bankrupted brick-and-mortar retailers.

An Amazon Prime truck.

Image source: Amazon.

However, I believe that Trump's misguided attacks won't dent Amazon's long-term growth. Instead, Trump's constant pressure actually gives long-term investors a rare buying opportunity in the top e-commerce company in the world.

Why I bought Amazon at $600

When I started buying Amazon two years ago, the bear case against the stock was a familiar one: its profits were slim and inconsistent, and the stock was too expensive.

However, I noticed two things -- its expanding Prime ecosystem locked in customers, and its cloud platform AWS (Amazon Web Services) generated consistent profits. Therefore, the online marketplace business had low margins, but the growth of its high-margin AWS revenues would help Amazon finally generate stable profits.

As for its valuation, I wasn't terribly concerned about its triple-digit P/E, since high-growth companies like Amazon can be better measured via their EV/EBITDA and EV/FCF ratios. Those two figures actually declined as its stock price surged over the past several years -- indicating that the stock was actually getting cheaper as its price rose.

AMZN Chart

Source: YCharts

Why I'd buy it again at $1,400

I bought my last batch of Amazon shares in Nov. 2016, and I'm not planning to add any more shares due to its current weight in my portfolio. But if I hadn't finished building my position in Amazon, I'd definitely buy it again around $1,300 to $1,400 on any Trump-induced dips for four simple reasons.

First, my two core reasons for buying Amazon in the first place -- Prime and AWS -- remain sturdy pillars of growth. Last October, research firm CIRP estimated that 63% of Amazon's US customer base, or 90 million people, were Prime members. That's up from 80 million in April. CIRP estimated that the average Prime member spent $1,700 on Amazon annually, versus $700 for non-Prime members.

AWS remains the largest public cloud platform in the world. The unit's revenue rose 43% to $17.5 billion last year, accounting for 10% of Amazon's top line. Its operating income grew 39% to $4.3 billion, compared to Amazon's total operating profits of $4.1 billion. Without AWS, Amazon would have finished the year with an operating loss. Instead, Amazon's net income rose 28% to $3 billion for the full year.

An Amazon fulfillment center.

Image source: Amazon.

Meanwhile, most of Trump's claims about Amazon are misleading. Amazon doesn't evade taxes -- it charges state sales taxes on all the goods it directly sells to consumers. Third-party vendors that sell products on Amazon pay sales taxes in Washington state, where Amazon is headquartered, and Pennsylvania, which could host Amazon's second headquarters.

Amazon paid $957 million in worldwide income taxes last year, up from $412 million in 2016. Amazon often receives tax breaks and subsidies from states, but mostly because it employs hundreds of thousands of employees. Amazon also received an ironic windfall of $789 million from Trump's Tax Cuts and Jobs Act last year.

As for the Postal Service, Amazon ships packages at a discounted rate, but the company claims that the Postal Regulatory Commission "consistently found that Amazon's contracts with the USPS are profitable."

Lastly, Amazon's valuations still haven't overheated. Its EV/EBITDA ratio of 41 doesn't look historically cheap, but it represents a significant cooldown from mid-March, when it hit 50.

The key takeaway

Investors are probably baffled by Trump's repeated attacks on one of the biggest job creators in the country. However, that noise will likely fade, and investors will once again consider Amazon to be one of the greatest growth stories of the past two decades.