Question

I'm wondering if it's possible to deploy a clone of a server on a per user basis on something like AWS? I want to simulate interaction for training purposes with a small network (pings, TCP scans etc) through a Web application. My initial thoughts are to just fake the responses one would expect to see with another part of the Web app. However I'm wondering if this could be done by actually setting up a network on AWS once the user loads my application.

Ideally it would be great if the instance could be torn down again once the user has finished for security reasons.

Is this sort of thing possible yet or am I living in a dream world? I don't need any specifics as of yet, just a pointer in the right direction.

Était-ce utile?

La solution

Yes this is definitely possible.

You can use the AWS APIs in whichever your chosen language is (https://aws.amazon.com/tools/) to communicate with AWS and set up EC2s (machine instances). If you manually set them up in the console first, remote onto them, and then setup all the software etc you require. Them if you save these as AMI (amazon machine images) you can programmatically relaunch as many of these whenever required based on this AMI.

Make sure you are using --instance-initiated-shutdown-behavior terminate to ensure when you shut down these ec2 instances they terminate and stop charging you money.

I would have a go with the AWS Console first, see if you can set up what you want, then look at saving these as AMI's and programmatically launching them

Autres conseils

If you want to set up a small network for training, I would recommend creating a VPC, and launching your instances into that. That way you will have complete control over networking, routing, protocols, etc.

You should be able to create a cloudformation script that will create the entire environment for you with a single command, and when you're done it's another command to tear it all down again.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top