This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to start/stop instances and open SSH tunnel. | |
# Ideal for instances where you want to persist storage and be able to start/stop the instance on demand | |
# Forked from https://gist.github.com/dserodio/aaf4c62311fe5d6fbfaf | |
# requires Python 2.7 to parse JSON response | |
# requires the aws package locally -- sudo apt-get install awscli | |
# Run 'aws configure' first and enter access key and secret key | |
# Make sure to set region! | |
# Beware! You will still be charged for EBS while the instance is stopped: https://aws.amazon.com/ebs/pricing/ |