AWS EC2
ec2 instances are associated with key pairs.
before you create a new ec2 instance, create a new key pair that you will associate with the instance.
aws ec2 create-key-pair --profile <yourname> --key-name <yourkeyname> --query 'KeyMaterial' --output text > ~/.ssh/<yourkeyname>.pem
chmod 400 ~/.ssh/<yourkeyname>.pem
aws ec2 create-security-group --profile <yourname> --group-name <yoursecgroupname> --description "<description>"
running this command will return the identifier of the sec group generated by aws. it will look something like:
sg-
aws ec2 authorize-security-group-ingress --profile <yourname> --group-id sg-<alphanumeric> --protocol tcp --port 22 --cidr <yourip>/32
aws ec2 authorize-security-group-ingress --profile <yourname> --group-id sg-<alphanumeric> --protocol tcp --port 80 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --profile <yourname> --group-id sg-<alphanumeric> --protocol tcp --port 443 --cidr 0.0.0.0/0
aws ec2 run-instances --profile <yourname> --image-id <imageid> --count 1 --instance-type t2.micro --key-name <yourkeyname> --security-group-ids sg-<alphanumeric>
at the time of writing this, the most up to date amazon linux ami build was ami-08111162.
all this allows up to ssh in.
-done-sudo yum update -y -done-sudo yum install -y nginx sudo yum install git -y sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
https://en.wikipedia.org/wiki/Httpd https://gist.github.com/dragonjet/270cf0139df45d1b7690 http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.html