Last active
June 11, 2017 18:40
-
-
Save benileo/a61098be565e0ea02da7f11046f44ed0 to your computer and use it in GitHub Desktop.
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 -ex | |
AMI_ID=ami-efd0428f | |
PROFILE=jammin | |
REGION=us-west-2 | |
USER_DATA=$(mktemp) | |
TYPE="t2.micro" | |
DRY_RUN="" | |
write-mime-multipart --output=$USER_DATA \ | |
cloud-init.template bootstrap.sh:text/x-shellscript | |
aws --profile $PROFILE --region $REGION ec2 run-instances $DRY_RUN \ | |
--image-id $AMI_ID \ | |
--user-data file://$USER_DATA \ | |
--instance-type $TYPE \ | |
--count 1 \ | |
--subnet-id xxxxxxxxxx \ | |
--security-group-ids xxxxxxxxxx \ | |
--block-device-mappings file://mapping.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment