Tool to start up ec2 spot instances and run a Docker experiment on them

Usage no npm install needed!

<script type="module">
  import ec2DockerExperiment from '';



Runs a docker image on a ec2 spot instance and uploads the results to s3.

How to use?

  1. You need the command line tool:
$ npm i ec2-docker-experiment -g
  1. Add a Dockerfile to your folder. It will be run with $ docker run if it works on your system it will most likely also run on the server.

  2. Add a experiment.yaml to your folder that contains the spec for the instance that has to be run.

Then you can start the experiment with in your folder:

$ ec2-docker-experiment .


This script requires access to AWS using secret access keys. The keys can be limited to EC2 access but they need to be able to change/access everything.

If you wish to load data from a bucket and upload the results to a bucket then you need to give access the user with formentioned access-keys access to this bucket.

Why encapsulated in a docker script?

For tests you want a clean environment. Docker offers a clean system to start from and so tests can be executed multiple times.