"This is all about scaling cost effectively,” said Dave Clark, senior vice president of Amazon Worldwide Operations. He said the new delivery program will help meet the growth in e-commerce. “We are going to have to meet this growth, and it's outpacing the growth of our core providers.”

Each delivery unit will start their day at one of 75 current Amazon stations in the U.S. where parcels ordered from Amazon.com are picked up by drivers wearing blue-collared shirts with an Amazon logo and black hats. Algorithms will determine which packages are sent to these delivery stations, and which are sent to other delivery partners, like FedEx and UPS.

The e-commerce behemoth announced on Thursday its new Delivery Service Partners program — designed to let entrepreneurs run their own local delivery networks of up to 40 vans emblazoned with Prime logos.

Watch out FedEx , UPS , DHL and the U.S. Postal Service: Amazon is building its own last-mile delivery service.

This year, more than 40 percent of all e-commerce purchases will be made on Amazon, according to an eMarketer estimate.

Clark said Amazon has “great relationships” with its external delivery partners. “We use everything in order to meet our scale and meet our needs. I don’t see that changing in the future,” he said.

In its latest annual 10-K filing, Amazon noted the risk associated with relying on external partners like FedEx and UPS. “If we are unable to negotiate acceptable terms with these companies or they experience performance problems or other difficulties, it could negatively impact our operating results and customer experience.”

In the filing, Amazon said shipping costs — including sorting, delivery center and transportation expenses — ballooned from $11.5 billion in 2015 to $21.7 billion in 2017, and its shipping costs are expected to continue to increase.

The new program brings more of the costs and customer service under its control, while letting entrepreneurs run the operations under the behemoth’s name.

The e-commerce giant said the program will enable “hundreds” of small businesses to get started, and it will ultimately hire “tens of thousands” of new delivery drivers across the country. This comes at a time when there is a trucker shortage in the U.S., adding to rising transportation costs for many businesses.

Amazon isn't providing an estimate for how many or how long it will take to get more delivery stations built in order to get packages to these new 10s of thousands of delivery drivers.

Each Delivery Service Partner can start a business with as little as a $10,000 investment. The partner is vetted by Amazon, and once accepted, will lease Prime-branded vehicles from Amazon, but the entrepreneur will be in charge of recruiting and hiring drivers. Amazon will offer discounts for costs incurred to run the business on expenses like fuel, insurance and benefit programs. The company says the program is set up so successful delivery partners can make up to $300,000 in annual profit.

Olaoluwa Abimbola has been running his delivery service business in the Denver area as part of the beta test for the last five months. While his background is in computer science and not logistics, he says he’s “loving” his new business and has already hired more than 40 employees who work “fairly regular hours” and “are encouraged to take breaks.”

This new last-mile delivery program is in addition to Amazon Flex, a delivery program in more than 50 U.S. cities that operates more like Uber or Lyft, with “gig workers” delivering parcels from their own vehicles for $18 to $25 an hour.

Amazon’s Delivery Service Partners is just another part of the company’s own logistics network. It already has 7,000 of its own trucks and 40 airplanes which, along with external delivery partners, shipped more than 5 billion Prime items last year.

While Amazon won’t disclose the financials behind the new program, Clark says it’s “much more about customer experience and meeting overall growth. We think this is going to be a cost effective way to do that.”

Shares of FedEx were down more than 2 percent Thursday afternoon, while UPS' stock lost about 2.5 percent on the news.

“UPS closely monitors customer and competitor announcements, but we do not speculate on the likelihood of their success, nor potential impact on UPS’s business," a UPS spokesperson said in a statement to CNBC. "UPS is confident in its strategies and believes there is tremendous opportunity in the B2C market and more growth coming, regardless of how other companies may shift their use of UPS services."

"The Postal Service needs to earn its customers’ business every day by providing great service at a competitive price, and we continue to attract e-commerce customers and business partners because our customers see the value of our predictable service, enhanced visibility, and affordable pricing," a spokesperson for the U.S. Postal Service said.

FedEx didn't immediately respond to CNBC's request for comment.

Still, one analyst said the new pursuit by Amazon could actually be "a move that is likely welcomed by FedEx and UPS to some extent given the margin impact to the business."

"Last mile delivery is expensive and is the lowest margin business for FedEx and UPS," Cowen & Co. analyst John Blackledge said in a note to clients. "UPS is more exposed to last mile for Amazon, but ... new facilities coming online will help to partially tackle last mile delivery and improve the margin trajectory of that business line. FedEx['s] bread and butter remains B2B capabilities, a segment that Amazon has yet to express much interest in getting involved in."

— CNBC's Morgan Brennan and Lauren Thomas contributed to this reporting.