# aws-spot-advisor-sejto
Sejto aims to provide a bit better filtering capabilities of AWS Spot instances
than [AWS Spot Advisor]'s website. What's missing there for me? Filtering in
general.
Imagine yourself in your low-tech company running workloads on AWS Spot
instances and you notice that those Spot instances are being interrupted more
than usual. That's nothing unusual since availability of Spot instances changes
over time. You need to find a suitable alternative within budget. You don't need
bare metal machine or huge VM, just something with similar specification for a
reasonable price. Perhaps you cannot run your workload on Graviton instances,
therefore these are off the table as well.
Despite AWS Spot Advisor is a good tool, it will happily show you instances that
you don't want and need right now. And that's where Sejto comes in since it
offers the same capabilities as AWS Spot Advisor with some additional features.
AWS Spot Advisor features:
* filter by min vCPU
* filter by min memory
* filter EMR-only
* filter by OS
* filter by region
on top of that Sejto enables you to:
* filter by max vCPU
* filter by max memory
* filter by min/max interrupts
* filter by min/max savings
* filter out either bare metal or VM instances
* filter by series, generation or options, eg. include/exclude Graviton, AMD,
Intel, Trainium, 7th generation etc.
* output in text, CSV and JSON format
## Example usage
Example usage for Linux instances:
```Bash
$ aws_spot_advisor_sejto \
--region us-east-1 \
--os Linux \
--savings-min 60 \
--inters-max=15 \
--exclude-metal \
--vcpu-min 2 \
--mem-max 64
instance_type=t3.nano vcpus=2 mem_gb=0.5 savings=90% interrupts=<5%
instance_type=c8g.large vcpus=2 mem_gb=4.0 savings=87% interrupts=<5%
instance_type=inf2.xlarge vcpus=4 mem_gb=16.0 savings=85% interrupts=<5%
[...]
instance_type=m8g.2xlarge vcpus=8 mem_gb=32.0 savings=88% interrupts=5-10%
instance_type=m8g.large vcpus=2 mem_gb=8.0 savings=85% interrupts=5-10%
instance_type=c8g.4xlarge vcpus=16 mem_gb=32.0 savings=85% interrupts=5-10%
instance_type=m8g.xlarge vcpus=4 mem_gb=16.0 savings=85% interrupts=5-10%
instance_type=c7gn.large vcpus=2 mem_gb=4.0 savings=85% interrupts=5-10%
instance_type=c7gn.2xlarge vcpus=8 mem_gb=16.0 savings=81% interrupts=5-10%
[...]
```
And example usage for Windows instances:
```Bash
$ aws_spot_advisor_sejto \
--region us-east-1 \
--os Windows \
--savings-min 60 \
--inters-max=15 \
--exclude-metal \
--vcpu-min 2 \
--mem-max 64
instance_type=t2.2xlarge vcpus=8 mem_gb=32.0 savings=77% interrupts=<5%
instance_type=i3en.xlarge vcpus=4 mem_gb=32.0 savings=64% interrupts=<5%
instance_type=t3.medium vcpus=2 mem_gb=4.0 savings=62% interrupts=<5%
instance_type=r6idn.large vcpus=2 mem_gb=16.0 savings=61% interrupts=<5%
instance_type=g4ad.xlarge vcpus=4 mem_gb=16.0 savings=61% interrupts=<5%
instance_type=g5.xlarge vcpus=4 mem_gb=16.0 savings=76% interrupts=5-10%
instance_type=g4dn.xlarge vcpus=4 mem_gb=16.0 savings=67% interrupts=5-10%
instance_type=d3en.4xlarge vcpus=16 mem_gb=64.0 savings=67% interrupts=5-10%
instance_type=r7iz.large vcpus=2 mem_gb=16.0 savings=60% interrupts=5-10%
```
## Possible planned features
* show cost/pricing
* web UI
## Data structures
### Spot Advisor
Example:
```Python
>>> data["global_rate"]
'<10%'
>>> data['instance_types']['r8g.24xlarge']
{'emr': True, 'cores': 96, 'ram_gb': 768.0}
>>> data['ranges']
[
{'index': 0, 'label': '<5%', 'dots': 0, 'max': 5},
{'index': 1, 'label': '5-10%', 'dots': 1, 'max': 11},
[...]
]
>>> data['spot_advisor']['us-east-1']['Linux']['r5.16xlarge']
{'s': 82, 'r': 4}
```
* `global_rate` - global rate of interruptions(I guess)
* `instance_types` - list of AWS instances and their parameters
* `emr` - whether instance supports EMR
* `cores` - number of vCPUs
* `ram_gb` - amount of RAM in GB
* `ranges` - lookup/aggregation table for `spot_advisor`
* `spot_advisor` - approximate savings and interruptions in given region, for
given OS and AWS instance
* `s` - savings in percent
* `r` - interrupt range, lookup in `ranges`
[AWS Spot Advisor]: https://aws.amazon.com/ec2/spot/instance-advisor/
Raw data
{
"_id": null,
"home_page": null,
"name": "aws-spot-advisor-sejto",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "aws",
"author": "Zdenek Styblik",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/a0/0b/afdc8e7bf6028bcb462ec8ee5055fc6084e88358312c9c7655bb8ab5dc8d/aws_spot_advisor_sejto-0.0.2.tar.gz",
"platform": null,
"description": "# aws-spot-advisor-sejto\n\nSejto aims to provide a bit better filtering capabilities of AWS Spot instances\nthan [AWS Spot Advisor]'s website. What's missing there for me? Filtering in\ngeneral.\n\nImagine yourself in your low-tech company running workloads on AWS Spot\ninstances and you notice that those Spot instances are being interrupted more\nthan usual. That's nothing unusual since availability of Spot instances changes\nover time. You need to find a suitable alternative within budget. You don't need\nbare metal machine or huge VM, just something with similar specification for a\nreasonable price. Perhaps you cannot run your workload on Graviton instances,\ntherefore these are off the table as well.\n\nDespite AWS Spot Advisor is a good tool, it will happily show you instances that\nyou don't want and need right now. And that's where Sejto comes in since it\noffers the same capabilities as AWS Spot Advisor with some additional features.\n\nAWS Spot Advisor features:\n\n* filter by min vCPU\n* filter by min memory\n* filter EMR-only\n* filter by OS\n* filter by region\n\non top of that Sejto enables you to:\n\n* filter by max vCPU\n* filter by max memory\n* filter by min/max interrupts\n* filter by min/max savings\n* filter out either bare metal or VM instances\n* filter by series, generation or options, eg. include/exclude Graviton, AMD,\n Intel, Trainium, 7th generation etc.\n* output in text, CSV and JSON format\n\n## Example usage\n\nExample usage for Linux instances:\n\n```Bash\n$ aws_spot_advisor_sejto \\\n --region us-east-1 \\\n --os Linux \\\n --savings-min 60 \\\n --inters-max=15 \\\n --exclude-metal \\\n --vcpu-min 2 \\\n --mem-max 64\ninstance_type=t3.nano vcpus=2 mem_gb=0.5 savings=90% interrupts=<5%\ninstance_type=c8g.large vcpus=2 mem_gb=4.0 savings=87% interrupts=<5%\ninstance_type=inf2.xlarge vcpus=4 mem_gb=16.0 savings=85% interrupts=<5%\n[...]\ninstance_type=m8g.2xlarge vcpus=8 mem_gb=32.0 savings=88% interrupts=5-10%\ninstance_type=m8g.large vcpus=2 mem_gb=8.0 savings=85% interrupts=5-10%\ninstance_type=c8g.4xlarge vcpus=16 mem_gb=32.0 savings=85% interrupts=5-10%\ninstance_type=m8g.xlarge vcpus=4 mem_gb=16.0 savings=85% interrupts=5-10%\ninstance_type=c7gn.large vcpus=2 mem_gb=4.0 savings=85% interrupts=5-10%\ninstance_type=c7gn.2xlarge vcpus=8 mem_gb=16.0 savings=81% interrupts=5-10%\n[...]\n```\n\nAnd example usage for Windows instances:\n\n```Bash\n$ aws_spot_advisor_sejto \\\n --region us-east-1 \\\n --os Windows \\\n --savings-min 60 \\\n --inters-max=15 \\\n --exclude-metal \\\n --vcpu-min 2 \\\n --mem-max 64\ninstance_type=t2.2xlarge vcpus=8 mem_gb=32.0 savings=77% interrupts=<5%\ninstance_type=i3en.xlarge vcpus=4 mem_gb=32.0 savings=64% interrupts=<5%\ninstance_type=t3.medium vcpus=2 mem_gb=4.0 savings=62% interrupts=<5%\ninstance_type=r6idn.large vcpus=2 mem_gb=16.0 savings=61% interrupts=<5%\ninstance_type=g4ad.xlarge vcpus=4 mem_gb=16.0 savings=61% interrupts=<5%\ninstance_type=g5.xlarge vcpus=4 mem_gb=16.0 savings=76% interrupts=5-10%\ninstance_type=g4dn.xlarge vcpus=4 mem_gb=16.0 savings=67% interrupts=5-10%\ninstance_type=d3en.4xlarge vcpus=16 mem_gb=64.0 savings=67% interrupts=5-10%\ninstance_type=r7iz.large vcpus=2 mem_gb=16.0 savings=60% interrupts=5-10%\n```\n\n## Possible planned features\n\n* show cost/pricing\n* web UI\n\n## Data structures\n\n### Spot Advisor\n\nExample:\n\n```Python\n>>> data[\"global_rate\"]\n'<10%'\n>>> data['instance_types']['r8g.24xlarge']\n{'emr': True, 'cores': 96, 'ram_gb': 768.0}\n>>> data['ranges']\n[\n {'index': 0, 'label': '<5%', 'dots': 0, 'max': 5},\n {'index': 1, 'label': '5-10%', 'dots': 1, 'max': 11},\n [...]\n]\n>>> data['spot_advisor']['us-east-1']['Linux']['r5.16xlarge']\n{'s': 82, 'r': 4}\n```\n\n* `global_rate` - global rate of interruptions(I guess)\n* `instance_types` - list of AWS instances and their parameters\n * `emr` - whether instance supports EMR\n * `cores` - number of vCPUs\n * `ram_gb` - amount of RAM in GB\n* `ranges` - lookup/aggregation table for `spot_advisor`\n* `spot_advisor` - approximate savings and interruptions in given region, for\n given OS and AWS instance\n * `s` - savings in percent\n * `r` - interrupt range, lookup in `ranges`\n\n\n[AWS Spot Advisor]: https://aws.amazon.com/ec2/spot/instance-advisor/\n",
"bugtrack_url": null,
"license": null,
"summary": "Slightly improved version of AWS Spot Advisor",
"version": "0.0.2",
"project_urls": {
"Issues": "https://github.com/zstyblik/aws-spot-advisor-sejto/issues",
"Repository": "https://github.com/zstyblik/aws-spot-advisor-sejto.git"
},
"split_keywords": [
"aws"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0621efbc763845f962121ca2b77f90884102200e433329bbd686c1db8617a902",
"md5": "7789baa4ce5769bf0eb01be7008c6b09",
"sha256": "5cf27254213129f8de5ff29da10bcd80bf2a24441b904b7418140718117d43f9"
},
"downloads": -1,
"filename": "aws_spot_advisor_sejto-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7789baa4ce5769bf0eb01be7008c6b09",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 17267,
"upload_time": "2024-12-17T21:22:50",
"upload_time_iso_8601": "2024-12-17T21:22:50.700957Z",
"url": "https://files.pythonhosted.org/packages/06/21/efbc763845f962121ca2b77f90884102200e433329bbd686c1db8617a902/aws_spot_advisor_sejto-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a00bafdc8e7bf6028bcb462ec8ee5055fc6084e88358312c9c7655bb8ab5dc8d",
"md5": "564c0238a9d745b87ffd12ca214b6be3",
"sha256": "88e9f04d4974856998a56d210f4184b746e61a08e721d892107807f3ccab6ac9"
},
"downloads": -1,
"filename": "aws_spot_advisor_sejto-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "564c0238a9d745b87ffd12ca214b6be3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 24988,
"upload_time": "2024-12-17T21:22:53",
"upload_time_iso_8601": "2024-12-17T21:22:53.182643Z",
"url": "https://files.pythonhosted.org/packages/a0/0b/afdc8e7bf6028bcb462ec8ee5055fc6084e88358312c9c7655bb8ab5dc8d/aws_spot_advisor_sejto-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-17 21:22:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zstyblik",
"github_project": "aws-spot-advisor-sejto",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
}
],
"lcname": "aws-spot-advisor-sejto"
}