AWS EC2/RDS Instance Right-Sizer
This tool is designed and written in Python 3.6.5 to help you determine the right AWS EC2/RDS instance type for your servers based on historical usage.
Usage:
uUsage: rightsizer.py [OPTIONS]
rightsizer takes user input and provides an output CSV of suggestions.
Options:
-p, --profile TEXT Your AWS Credentials Profile.
-k, --access-key TEXT Your AWS Access Key ID.
-s, --secret-key TEXT Your AWS Secret Access Key ID.
-r, --region TEXT The AWS Region to query.
-t, --threshold INTEGER... The Cloudwatch [average, max] CPU usage
threshold.
-q, --query-config INTEGER... The amount of [days, period] to query
Cloudwatch for.
-o, --output TEXT The Name/Location of the file to output.
-e, --ec2-only
-d, --rds-only
-v, --verbose
-h, --help Print help message
Installation:
A pip package is available for this tool. This is the recommended way to install and run the tool. Download and run the tool using the steps below:
-
python3 -m pip install awsrightsizer --user -
rightsizer [OPTIONS]
Upgrading
Upgrading is easy as well with pip, simply issue the following commands:
-
python3 -m pip install awsrightsizer --upgrade --user -
rightsizer [OPTIONS]
Source Installation:
This tool is best run in a virtual environment. You may need to install a virtual environment tool such as python3-venv or python3-virutalenv via your package manager and/or install one via pip by running pip install virtualenv --user.
-
git clone https://github.com/gregoryjordanm/awsrightsizer.git -
cd ./awsrightsizer -
python3 -m venv venvorvirtualenv -p python3 venv -
. ./venv/bin/activate -
pip install -r requirements -
python rightsizer.py [OPTIONS]
Running Example:
Lets assume for a second that you have already installed the AWS CLI tools for your distribution...
Lets also assume that you have already run the aws configure command and have a profile named "dev" on your system that you have already tested and is functioning :)
To run this tool with your working profile, simply do the following:
rightsizer -p dev
The tool will output a "report_date.csv" file in the directory you ran it in.
Lets now assume that you hate my report name, simply run:
rightsizer -p dev -o your_awesome_new_csv.csv
The tool will now use your_awesome_new_csv.csv is the output file.
If you don't have an AWS profile set up for some reason (it really does make life easier), then you can use the -k, -s. and -r flags to provide the necessary info.
rightsizer -k XXXXXXXXXXXX -s XXXXXXXXXXXXXXXXXXXXXXXX -r us-east-1
If you don't want to have the tool pull 30 days worth of data, or if you don't want the data periods to be 30 minutes, use the -q flag like so:
rightsizer -p dev -q 15,900
This will tell the tool to query 15 days at 15 minute intervals.
To run against just your EC2 assets, just issue the -e flag.
To run against just your RDS assets, just issue the -d flag.
If you are running this via the source, you will need to add python rightsizer.py to your command instead of just rightsizer.
Let me know if you find bugs :)
Attribution:
This tools is loosely based on the awsstats tool by FittedCloud.
Metadata
Release files for awsrightsizer 1.1.2
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 |
|---|---|---|---|---|
| awsrightsizer-1.1.2.tar.gz | 14.9 kB | Without provenance | Details for awsrightsizer-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| awsrightsizer-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for awsrightsizer-1.1.2-py3-none-any.whl |
Total release size: 102.0 kB
Release files / awsrightsizer-1.1.2.tar.gz
| Download URL | awsrightsizer-1.1.2.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69d1ba348401a917c5e690043c3ceba8aac5ee22a5f50588a21d11b21cc4cbc2
|
|
BLAKE2b-256 checksum How to use checksums |
3bdff29d7325c97ae124b4525c6ec1e39f7bfc995f7962ee6d61c1e7e54e7039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.2 CPython/3.6.6 Linux/4.18.14-200.fc28.x86_64
|
Release files / awsrightsizer-1.1.2-py3-none-any.whl
| Download URL | awsrightsizer-1.1.2-py3-none-any.whl |
|---|---|
| Size | 87.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de98555086f6019b7395b5ca37a1ab6f6fd7a1fc5734d5c89d66b77ab743d419
|
|
BLAKE2b-256 checksum How to use checksums |
b793dc7cb2d690fec231d525fb9ca154e72f74033ca02e993c5d629a2760cf05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.2 CPython/3.6.6 Linux/4.18.14-200.fc28.x86_64
|
Security for awsrightsizer 1.1.2
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.