Giter Club home page Giter Club logo

aws-quickie's Introduction

A quick way to setup an AWS instance. Let's you bring it up and down via the command line. Uses Terraform to start/stop instances.

requires:

  • terraform
  • pip install awscli
  • jq
  • pip install boto3

setup:

  • cd to/your/project/dir
  • git clone [this repo]
  • run get_lowest_price.py to find the spot price for your chosen instance
  • cp aws-quickie/instance.tf instance.tf; vim instance.tf; //edit terraform file to your liking
  • cp aws-quickie/set_aws.sh.example set_aws.sh; vim aws.sh; //add your aws keys
  • source set_aws.sh
  • add/edit the makefile template below to your project's makefile
  • make apply (boot the instance)
  • make ssh (connect to the instance)
  • make destroy (kill the instance)

ideal usage:

Here's how I use it from another makefile:

#variables will get picked up by submake calls
export terraform_dir=`pwd`
export machine_name ?= ventrilo
export key_pair_name ?= ventrilo
export instance_type ?= t1.micro
export spot_price ?= 0.0033
#amazon linux on us-west-2
export ami ?= ami-81f7e8b1
#relative to aws-quickie dir
export user_data = ../vent_setup.sh

aws := make -C ./aws-quickie
apply:
	$(aws) apply

destroy:
	$(aws) destroy

ssh:
	$(aws) ssh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.