For Amazon, a "smart home" scenario isn't a question of if — but rather, when.

The tech giant announced hardware and a cloud-based service on Tuesday, both of which support web-enabled devices in the home.

The physical device, called the Dash button, will be available on Wednesday across the U.S. on an invite-only basis. The free plastic device is slightly larger than your thumb and connects to Wi-Fi; when you press it, the device will automatically order another pack of your shaving cartridges or bottle of your face moisturizer from Amazon Prime.

Amazon's new cloud-based service is called the Dash Replenishment Service (DRS), which will roll out this fall — and it has much more potential. If the Dash button is a physical, one-click access point to Amazon, think of DRS as a budding ecosystem of third-party devices, all running software that connect back to the tech giant.

The Amazon-branded home

Personalizing the Dash button is limited for the time being. Amazon will offer 18 different types, one for each of its 18 launch partners, including Gillette, Olay, Huggies, Bounty and Glacéau Smartwater.

The Dash button acts a one-click entry point to Amazon. Image: Amazon

Each branded button can be tweaked via the main Amazon app to order products, but only from that one brand. Shoppers can choose whether pressing the Gillette Dash button would order another 5-pack of shaving cartridges or a 10-pack, for instance. Items are delivered via Prime's standard two-day shipping option, but users can also opt for same-day delivery for an added price.

Amazon hopes that shoppers will sprinkle their homes with these Dash buttons, so if you run out of an item, you can just press a button on your coffee table.

The benefits for Amazon are obvious: A home armed with Dash buttons makes it easier than ever for people to purchase goods from the company and encourages them to buy more often. It also lowers the chances of folks straying outside Amazon when reordering is a button away.

But whether shoppers actually adopt Amazon's Dash buttons is unclear. Having a Kindle or Fire TV lying around the house is one thing, but a home peppered with Dash buttons? That's be a harder vision to sell, even if the little devices are free.

When you're running low, the products know

Amazon has partnered with four companies — Whirlpool, Brita, Brother and New York-based invention company Quirky — to release products throughout 2015 that connect to the web and run DRS. In turn, DRS runs on Amazon Web Services, the infrastructure platform that stores and crunches data for more than 1 million customers, including NASA, Netflix and Pinterest.

Select new Brita water pitchers will feature a sensor that measures usage, and when the time comes, connects to Amazon and reorders water filters. Likewise, a group household products — an artisanal coffee maker, pet food dispenser and infant formula dispenser — manufactured by Quirky requests more coffee beans, pet food or infant formula when they run low. Whirlpool's Cabrio line of washers and dryers just require a software update to order laundry detergent as needed.

With just four companies involved, DRS-enabled products will be in limited supply this year, but Amazon intimates many more possibilities. Of course, that's dependent on whether shoppers show interest and more companies partner up.

This isn't Amazon's first foray into the so-called Internet of Things, a growing gaggle of web-connected items and devices capable of tracking your behavior. In November, the tech giant announced Amazon Echo, a voice-controlled cylinder-shaped device that is part speaker, part virtual assistant and lets users play music, create to-do lists and listen to the news.

Amazon is among a slew of tech companies, from Facebook to Samsung, that are betting web-connected devices like coffee makers and washers and dryers will become cash cows in a few years. Just last week, Facebook unveiled a new software development kit to support such devices. Google acquired smart thermostat maker Nest early last year for a cool $3.2 billion.

But tech companies aren't the only ones drooling. The research agency IDC estimates the Internet of Things will be worth $7.1 trillion in five years. Put another way,the market may be more than twice the size of the smartphone, PC, tablet, connected car and wearable market combined come 2019, according to a Business Insider report.

That's all well and good (if hypothetical), but assuming the smart home concept takes off, companies like Amazon, Facebook and Samsung will face real challenges along the way around adoption and security. (Amazon, for its part, told Mashable that DRS adopts the same security standards used in other areas of its business, including standard web site purchases.) And in the long term, it's unclear whether these devices will "play nice" if they run on different software platforms.

But in the short term, at least, the message is clear: Shopping just got even easier — provided, of course, it's shopping done the Amazon way.