Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Withers pl1ght

View GitHub Profile
@pl1ght
pl1ght / ec2cleanup.rb
Last active Jan 11, 2018
ec2 cleanup with cloudwatch metrics, similar to the ebscleanup script
View ec2cleanup.rb
require 'aws-sdk'
require 'logger'
require 'json'
# Logging options
@log = Logger.new('ec2cleanup.log','weekly')
@log_candidate = Logger.new('ec2candidates.log','weekly')
# shared profile account
@profile = "profilename"