Skip to content

Instantly share code, notes, and snippets.

@shearluck
Created April 29, 2019 03:35
Show Gist options
  • Save shearluck/b15b10898eec8de8c5bf8d817f974417 to your computer and use it in GitHub Desktop.
Save shearluck/b15b10898eec8de8c5bf8d817f974417 to your computer and use it in GitHub Desktop.
# How many hours
DURATION_HRS=1
let DURATION_MINS=$DURATION_HRS*60
aws ec2 request-spot-instances --block-duration-minutes $DURATION_MINS --launch-specification file://bastion-spot-specs.json
{
"SecurityGroupIds": ["sg-idhere"],
"ImageId": "ami-009d6802948d06e52",
"InstanceType": "c3.large",
"KeyName": "ssh-key-name",
"SubnetId": "vpc-public-subnet-id"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment