- Launch an
Ubuntu 16.04
instance - Copy
id_rsa
andid_rsa.pub
to/home/ubuntu/.ssh
- Append
id_rsa.pub
to/home/ubuntu/.ssh/authorized_keys
- Copy
bootstrap.sh
to/home/ubuntu
- Run
echo "@reboot sleep 30 && ssh -oStrictHostKeyChecking=no ubuntu@localhost ${HOME}/bootstrap.sh 0 >> ${HOME}/bootstrap.log 2>&1" | crontab -
- Create AMI
- Create Instance
- Choose the AMI
- Add user-data (e.g. GIT_REPO=)
- Launch Instance -- Choose "No Key"