Creating Linux Instances on the fly

I am looking for a solution where you can create a linux instance by clicking a button on the browser.
The linux instance will have a web console.
It will be temporary (customized time) and with resources like RAM and Storage set to limit.
The solution should run in the cloud (AWS, DigitalOcean, etc…)
Any number of such instances can be created (or at least there is a constraint or financially more expensive)

One IP should be sufficient given that each instance can randomly choose ports to run its services (with feedback to the user on which port the executed service is running).

I looked to using Vagrant with scripts controlling such solution.

Any other ideas that should make the process easier?

Kind regards,

I don’t about browser but you can use tools like

  • Ansible
  • terraform
  • CloudFormation
  • Chef etc