Metadata-Version: 2.1
Name: soft-spot
Version: 0.2.0
Summary: Move to a land of Spot AWS instances
Home-page: https://github.com/fferegrino/soft-spot
License: MIT
Author: Antonio Feregrino
Author-email: antonio.feregrino@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Utilities
Requires-Dist: boto3 (>=1.9,<2.0)
Requires-Dist: click (>=7.0,<8.0)
Project-URL: Repository, https://github.com/fferegrino/soft-spot
Description-Content-Type: text/markdown

# soft-spot

[![Build Status](https://dev.azure.com/messier-16/soft-spot/_apis/build/status/fferegrino.soft-spot?branchName=master)](https://dev.azure.com/messier-16/soft-spot/_build/latest?definitionId=1&branchName=master) [![PyPI version](https://badge.fury.io/py/soft-spot.svg)](https://pypi.org/project/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:  

```ini
[INSTANCE]
ami = ami-06f2f779464715dc5
type = t2.micro
security_group = wizard-launch
key_pair = a_secret_key
spot_price = 0.0035

[ACCOUNT]
user = unbuntu

[VOLUME]
id = vol-volume123
device = /dev/sda2
mount_point = /data/
```

Then just execute the `sspot request` command:  

```bash
sspot request <<instance_config_file>>
```

### Credentials  
This script uses `boto3` so I strongly recommend heading over to [its documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html) to learn more.  

Alternatively, you could create a tiny configuration file like this:  

```ini
[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:

```bash
sspot -a ~/aws_credentials.txt request <<instance_config_file>> 
```

