Now you have to build or configure a system for spinning those up and down at the command of anonymous visitors to your website. Or eat the cost of running a whole bunch of them all the time. And test that system. And monitor it. And secure it (and no matter how well you do that, you're now exposed to a wider set of risks than you were if you hadn't built this thing). And do maintenance development as dumb crap happens under & around you ("fucking [vendor] API broke on us again, with what was allegedly just a bugfix update, that they rolled out at local midnight on a Saturday without warning..."). And have another thing to look at & talk about in budgeting discussions and spending audits.
Yes, of course you can do it, and the cost of running it may be low, but the cost of bandwidth transfer to send the files to browsers so they can run these instead is probably a lot lower, and saves 100%[1] of that initial and ongoing development & operational spending. There's a largish complexity cost to the whole thing, that's all but completely absent if you run it in the browser instead.
The raw cost of running ephemeral VMs isn't the meat of the expenses I meant.
[1, edit] OK, not 100% exactly because they did have to develop this thing the link is about, but that's also a thing that can be used for other stuff, too, not just yet another way to press a button and spin up a cheap VM running Wordpress—this is a unique product, potentially, with many uses, one application of which happens to be filling the role of providing live demos in Automattic's theme/plugin marketplace.
Yes, of course you can do it, and the cost of running it may be low, but the cost of bandwidth transfer to send the files to browsers so they can run these instead is probably a lot lower, and saves 100%[1] of that initial and ongoing development & operational spending. There's a largish complexity cost to the whole thing, that's all but completely absent if you run it in the browser instead.
The raw cost of running ephemeral VMs isn't the meat of the expenses I meant.
[1, edit] OK, not 100% exactly because they did have to develop this thing the link is about, but that's also a thing that can be used for other stuff, too, not just yet another way to press a button and spin up a cheap VM running Wordpress—this is a unique product, potentially, with many uses, one application of which happens to be filling the role of providing live demos in Automattic's theme/plugin marketplace.