Skip to content

Instantly share code, notes, and snippets.

@vicenteg
Created April 3, 2015 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vicenteg/2174325e1ee6095e679b to your computer and use it in GitHub Desktop.
Save vicenteg/2174325e1ee6095e679b to your computer and use it in GitHub Desktop.
Collect spot instance request data for all regions.
#!/bin/sh
REGIONS="ap-southeast-2 ap-southeast-1 ap-northeast-1 us-east-1 us-west-1 us-west-2 eu-west-1 eu-central-1"
for region in $REGIONS; do
aws ec2 describe-spot-instance-requests --region $region ~/data/requests/spot-instance-requests-$region.json;
done
for region in $REGIONS; do
aws ec2 describe-instances --region $region > ~/data/instances/instances-$region.json;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment