Created
August 1, 2014 14:32
-
-
Save codeinthehole/588154f10899eb5dadb7 to your computer and use it in GitHub Desktop.
Minimal "user-data" for an AWS EC2 instance
This file contains 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 | |
BUCKET=tangent-boilerplate | |
# Install AWS CLI | |
apt-get update | |
apt-get install -y python-pip | |
pip install awscli | |
# Fetch and run bootstrap file. For this to work, the EC2 instance needs to have an IAM role | |
# that allows read access to S3. | |
BOOTSTRAP_SCRIPT=/tmp/bootstrap.sh | |
aws s3 cp s3://$BUCKET/bootstrap/webserver.sh $BOOTSTRAP_SCRIPT | |
chmod +x $BOOTSTRAP_SCRIPT | |
$BOOTSTRAP_SCRIPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment