Run stuff on AWS spot instances easily.
$ pip install https://github.com/leadhub-code/spot-runner/archive/master.zip
# Modify the blueprint file so it contains your KeyName and SecurityGroupIds:
$ vim examples/hello/blueprint.yaml
$ spot-runner -v run_spot_instance --blueprint examples/hello/blueprint.yamlDo not forget to terminate the instance :)
spot_runner_blueprint:
region: eu-west-1
ami_owner_id_whitelist: ['379101102735']
task_id_template: hello-{date}-{fqdn}
spot_price: '1.50'
upload:
- setup.sh
upload_preprocessed:
- sample_conf.yaml
remote_command: ['bash', 'uploaded/setup.sh']
launch_specification:
ImageId: ami-ce76a7b7
KeyName: your-keyname-here
SecurityGroupIds:
- sg-123
InstanceType: m4.largeThis Spot Runner is specialized on management and setup of EC2 instances. For general AWS resource management we recommend Terraform.
