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-06d51e91cea0dac8d
type = t2.micro
security_group = SecurityGroupName
key_pair = some-key
spot_price = 0.005
availability_zone = us-west-2c
[VOLUME]
id = vol-00a56acb10f11b0e3
device = /dev/sdf
[ACCOUNT]
user = ubuntu
key_location = ~/.ssh/some-key.pem
[SCRIPT]
commands = ["sudo mkdir /data", "sudo mount /dev/xvdf /data", "sudo chown ubuntu /data"]
Then just execute the sspot request command:
sspot request <<instance_config_file>>
Other commands
cancel
Cancel all active spot requests and terminate the instances associated to them:
sspot cancel
price
Show the prices for the specified spot instance:
sspot price <<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-2
And then pass it on to the spot command:
sspot -a ~/aws_credentials.txt request <<instance_config_file>>
Metadata
Release files for soft-spot 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| soft-spot-0.4.0.tar.gz | 6.7 kB | Without provenance | Details for soft-spot-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| soft_spot-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for soft_spot-0.4.0-py3-none-any.whl |
Total release size: 14.3 kB
Release files / soft-spot-0.4.0.tar.gz
| Download URL | soft-spot-0.4.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4301c496da0b7876fdbb8ab37e055a502dfc9e410964cd9e3717ce4d6fc560f6
|
|
BLAKE2b-256 checksum How to use checksums |
01ba5be8763589e2d6a0321bf8b89f45ca3712e43fb74b1cb5cff14393da536c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.6.9 Linux/4.15.0-1061-azure
|
Release files / soft_spot-0.4.0-py3-none-any.whl
| Download URL | soft_spot-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a1e5ccb89972aff3ca7d8e9fa1ea044c248c8d2ae46cf3cfbf99d8a1bc9f2d1
|
|
BLAKE2b-256 checksum How to use checksums |
5ce224c1d780a9896f58af1675c7d1fa26d42c2be40c9159ef32755b9b79b122
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.6.9 Linux/4.15.0-1061-azure
|
Security for soft-spot 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.