Amazon (AMZN 0.81%) shares are little changed this year, compared to a 20% increase for the S&P 500. So it's clear the retailer's stock performance in 2021 hasn't been the best. Even worse, in the most recent quarter, Amazon reported declines in net income and operating income. And free cash flow dropped to $2.6 billion for the trailing 12 months compared to more than $29 billion in the year-earlier period.

But instead of forgetting all about this retail giant, I would look to buy more Amazon shares. Of course, I'm disappointed the stock didn't post a strong performance this year. But I know that rough earnings reports today don't spell catastrophe for Amazon. Instead, they spell investment in the business. Let's take a closer look at why my New Year's resolution is to buy more Amazon stock.

A person writes New Year's goals in a notebook in front of a Christmas tree.

Image source: Getty Images.

A look into the past

It's important to put Amazon's performance into perspective. First, from an earnings standpoint, the company has significantly increased annual net income since 2018. And annual revenue has steadily climbed over the past decade. Return on invested capital has also made its way higher.

AMZN Net Income (Annual) Chart

AMZN Net Income (Annual) data by YCharts

Last year, net sales climbed 38% to more than $386 billion, and net income doubled to about $21 billion. Of course, the pandemic offered Amazon a boost. That's as customers opted for online shopping as the coronavirus swept through the world.

The pandemic continues, but the situation this year has been different. Businesses have reopened, lockdowns are fewer, and for the most part, people have returned to their routines. Still, Amazon's business has continued to grow. For example, in the first quarter of this year, sales jumped 44% to $108 billion. And net income more than tripled to top $8 billion.

As I mentioned earlier, Amazon's most recent earnings report didn't look as bright. And the company even said the fourth quarter would bring "several billion dollars of additional costs." That's as Amazon deals with issues impacting the sector as a whole -- such as supply chain problems and higher shipping costs. Many of these problems are temporary.

At the same time, Amazon emphasized it would limit the impact on customers and partners that sell goods on the platform. And this is why I'm confident about the success of Amazon's business down the road. The company aims to keep its audience happy -- and that should keep customers and sellers coming back. It's also important to remember that e-commerce isn't going away. Worldwide retail e-commerce will rise more than 16% to $4.92 trillion this year, according to an eMarketer forecast. Amazon, as a leader, stands to benefit.

A reason to be optimistic about the future

Finally, Amazon's cloud computing business is another reason to be optimistic about future growth. Amazon Web Services (AWS) is the world's leading player, and its sales climbed 39% in the third quarter. And, importantly, it generally makes up more than half of Amazon's operating income. AWS continues to expand. It's got 81 availability zones through 25 regions globally -- and it plans to open 24 more availability zones and eight additional AWS regions. All of this means we can expect AWS to continue to drive profit.

As for Amazon's market performance, the stock has progressively climbed more than 1,700% over the past decade. Gains haven't happened overnight. Instead, they've accompanied Amazon's accomplishments. Everything Amazon is doing today -- along with the strength of AWS -- makes me confident this trend will continue over the long term. So I'm not worrying about the current rough patch. Instead, I'll look for opportunities to buy more of this great long-term stock.