Move to a land of Spot AWS instances
Project description
soft-spot
Do you have a soft spot for cheap cloud computing (a.k.a. AWS Spot instances)? Me too, no shame on that.
However, what is a shame is having to go through that clunky UI and click here and there to get one; soft-spot
makes it dead easy to launch an instance:
How?
Just define a file with the specifications of the machine you want to launch:
[INSTANCE]
ami = ami-06f2f779464715dc5
type = t2.micro
security_group = wizard-launch
key_pair = a_secret_key
spot_price = 0.0035
product_description = Linux/UNIX
availability_zone = eu-west-2b
[ACCOUNT]
user = unbuntu
[VOLUME]
id = vol-volume123
device = /dev/sda2
mount_point = /data/
Then just execute the sspot request
command:
sspot request <<instance_config_file>>
Credentials
This script uses boto3
so I strongly recommend heading over to its documentation to learn more.
Alternatively, you could create a tiny configuration file like this:
[DEFAULT]
aws_access_key_id = an_acces_key
aws_secret_access_key = a_secret_key
region_name = us-west-1
And then pass it on to the spot
command:
sspot -a ~/aws_credentials.txt request <<instance_config_file>>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
soft-spot-0.2.1.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for soft_spot-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbea2ec3026001828669fb71e342eccea9c49b6c0920b23e3dc90770e83dc74a |
|
MD5 | cf3eb1bd327370eff4f8caea136cd2d1 |
|
BLAKE2b-256 | e483785b420dce9c8f5740c215b101db131b6bd4e95847a090e648742ebc4b8b |