There are two trillion-dollar markets that are great new business opportunities for Amazon, according to D.A. Davidson.

The firm reiterated its buy rating for Amazon shares, saying the e-commerce giant should enter the travel and gas station markets.

"Based on our estimates, Amazon is currently pursuing 8 of 10 market opportunities that exceed $1T, globally. We see an opportunity for it to exploit the remaining two – gas (stations) and travel," analyst Tom Forte said in a note to clients Tuesday. The "company has a history of solving complex logistical problems. Financially, it seeks opportunities that can generate significant free cash flow."

Source: D.A. Davidson

The analyst noted more than 10 percent of Costco's sales are generated by its gas stations. He said Amazon could provide Prime subscriber discounts, expand its data collection on its customers and add thousands of distribution stores for its products through the gas stations.

Forte said Amazon could also follow Costco's model for travel deals, offering discounts for cruises, rental cars and vacations.

"Amazon could sell consumers not only the airline tickets and hotel accommodations but also everything they need for their trip," he said.