neelabalan / ec2instances.info

Amazon EC2 instance comparison site

Home Page:https://ec2instances.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EC2Instances.info

uses aws Python 3.8+ python style: black

Vantage Picture

I was sick of comparing EC2 instance metrics and pricing on Amazon's site so I made EC2Instances.info.

EC2Instances.info was originally created by Garret Heaton, is now hosted by Vantage and developed by the community of contributors.

Project status

Vantage employees are actively maintaining and hosting the site with the help of contributors here. Improvements in the form of pull requests or ideas via issues are welcome!

People have suggested many neat ideas and feature requests by opening issues on this repository. We also have a Slack Community for anyone to join with a devoted channel named #instances-vantage.sh.

Running locally

First, you'll need to provide credentials so that boto can access the AWS API. See a terraform example here! Options for setting this up are described in the boto docs. Ensure that your IAM user has at least the following permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["ec2:DescribeInstanceTypes", "ec2:DescribeRegions", "pricing:*"],
      "Resource": "*"
    }
  ]
}
  1. Clone the repository, if not already done:
git clone https://github.com/vantage-sh/ec2instances.info
cd ec2instances.info
  1. Build a docker image:
docker build -t ec2instances.info .
  1. Run a container from the built docker image:
docker run -d --name some-container -p 8080:8080 ec2instances.info
  1. Open localhost:8080 in your browser to see it in action.

Detailed local build instructions

Note: These instructions are only kept here for reference, the Docker instructions mentioned above hide all these details and are recommended for local execution.

Make sure you have LibXML and Python development files. On Ubuntu, run sudo apt-get install python-dev libxml2-dev libxslt1-dev libssl-dev.

Then:

git clone https://github.com/vantage-sh/ec2instances.info
cd ec2instances.info/
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
invoke build
invoke serve
open http://localhost:8080
deactivate # to exit virtualenv

Requirements

Tips for Developing Locally

docker build --no-cache --build-arg AWS_ACCESS_KEY_ID= --build-arg AWS_SECRET_ACCESS_KEY= -t ec2instances.info .

docker run -it --rm --name ec2instances -v $(pwd):/opt/app --env HTTP_HOST=0.0.0.0 -p 8080:8080 ec2instances.info

docker exec -it ec2instances /bin/bash

# INSIDE CONTAINER
python3 render.py
sass --watch in/style.scss:www/style.css

API Access

The data backing EC2Instances.info has recently been made available via a free API. All you need to get started is a free API key. To get started with API access, check out the devoted API documentation.

Keep up-to-date

Feel free to watch/star this repo as we're looking to update the site regularly. Vantage also works on the following relevant projects:

About

Amazon EC2 instance comparison site

https://ec2instances.info

License:MIT License


Languages

Language:Mako 52.5%Language:Python 38.3%Language:JavaScript 6.6%Language:SCSS 1.1%Language:CSS 1.1%Language:Nix 0.3%Language:Dockerfile 0.1%Language:Makefile 0.0%Language:HTML 0.0%