Skip to content

Instantly share code, notes, and snippets.

@mlogan
Last active December 25, 2015 01:19
Show Gist options
  • Save mlogan/6893983 to your computer and use it in GitHub Desktop.
Save mlogan/6893983 to your computer and use it in GitHub Desktop.
#!/usr/bin/env coffee
aws = require 'aws-sdk'
ec2 = new aws.EC2({region: 'us-west-1'})
doDescribeRegions = ->
ec2.describeRegions {}, (err, data) ->
if err?
console.log 'ERR:', err
return
else
console.log 'DATA:', data
doDescribeRegions()
for i in [1..24]
setTimeout doDescribeRegions, i * 60 * 60 * 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment